@@ -375,7 +375,7 @@ class Http3ApplicationImpl final : public Session::Application {
375375 Debug (&session (),
376376 " HTTP/3 application extending max stream data to %" PRIu64,
377377 max_data);
378- stream->UpdateWriteDesiredSize (); // the stream might be blocked on js side
378+ stream->UpdateWriteDesiredSize (); // the stream might be blocked on js side
379379 nghttp3_conn_unblock_stream (*this , stream->id ());
380380 }
381381
@@ -511,8 +511,9 @@ class Http3ApplicationImpl final : public Session::Application {
511511 code = error.code ();
512512 }
513513
514- int rv = nghttp3_conn_close_stream2 (*this , NGHTTP3_STREAM_CLOSE_FLAG_RX_APP_ERROR_CODE_SET ,
515- stream->id (), code, 0 );
514+ int rv = nghttp3_conn_close_stream2 (*this ,
515+ NGHTTP3_STREAM_CLOSE_FLAG_RX_APP_ERROR_CODE_SET ,
516+ stream->id (), code, 0 );
516517 // If the call is successful, Http3Application::OnStreamClose callback will
517518 // be invoked when the stream is ready to be closed. We'll handle destroying
518519 // the actual Stream object there.
@@ -650,18 +651,19 @@ class Http3ApplicationImpl final : public Session::Application {
650651 return false ;
651652 }
652653
653- bool MakeWebtransportStream (const Stream& stream, int64_t sessionid) override {
654+ bool MakeWebtransportStream (const Stream& stream,
655+ int64_t sessionid) override {
654656 Session::SendPendingDataScope send_scope (&session ());
655657 static constexpr nghttp3_data_reader reader = {on_read_data_callback};
656- const nghttp3_data_reader* reader_ptr = &reader; // can use the same reader
658+ const nghttp3_data_reader* reader_ptr = &reader; // can use the same reader
657659
658660 Debug (&session (),
659661 " Make stream %" PRIu64 " webtransport stream of session %" PRIu64,
660662 stream.id (),
661663 sessionid);
662- // we only need to do this, if we can send data
664+ // we only need to do this, if we can send data
663665 if (stream.is_remote_unidirectional ())
664- return true ; // so bail out for remote unidirectional streams
666+ return true ; // so bail out for remote unidirectional streams
665667 return nghttp3_conn_open_wt_data_stream (*this ,
666668 sessionid,
667669 stream.id (),
@@ -677,9 +679,8 @@ class Http3ApplicationImpl final : public Session::Application {
677679 bool CloseWebtransportSessionStream (
678680 const Stream& stream,
679681 uint32_t wt_error_code,
680- const uint8_t *msg,
681- size_t msglen
682- ) override {
682+ const uint8_t * msg,
683+ size_t msglen) override {
683684 Session::SendPendingDataScope send_scope (&session ());
684685 Debug (&session (),
685686 " Close webtransport session stream %" PRIu64,
@@ -877,7 +878,7 @@ class Http3ApplicationImpl final : public Session::Application {
877878 return Http3ConnectionPointer (conn);
878879 }
879880
880- void OnStreamClose (Stream* stream, uint32_t flags,
881+ void OnStreamClose (Stream* stream, uint32_t flags,
881882 error_code rx_app_error_code,
882883 error_code tx_app_error_code) {
883884 if (flags & NGHTTP3_STREAM_CLOSE_FLAG_RX_APP_ERROR_CODE_SET ) {
@@ -1299,32 +1300,36 @@ class Http3ApplicationImpl final : public Session::Application {
12991300 return NGHTTP3_ERR_CALLBACK_FAILURE ;
13001301 }
13011302
1302- static int on_receive_wt_data (nghttp3_conn * conn,
1303+ static int on_receive_wt_data (nghttp3_conn* conn,
13031304 int64_t session_id,
13041305 int64_t stream_id,
1305- const uint8_t * data,
1306+ const uint8_t * data,
13061307 size_t datalen,
1307- void * conn_user_data,
1308- void * stream_user_data) {
1308+ void * conn_user_data,
1309+ void * stream_user_data) {
13091310 NGHTTP3_CALLBACK_SCOPE (app);
13101311 auto & session = app.session ();
1311- if (auto stream = FindOrCreateStream (conn, &session, stream_id)) [[likely]] {
1312+ if (auto stream = FindOrCreateStream (conn,
1313+ &session,
1314+ stream_id)) [[likely]] {
13121315 stream->ReceiveData (data, datalen, Stream::ReceiveDataFlags{});
13131316 return NGTCP2_SUCCESS ;
13141317 }
13151318 return NGHTTP3_ERR_CALLBACK_FAILURE ;
13161319 }
13171320
1318- static int on_wt_data_stream_open (nghttp3_conn * conn,
1321+ static int on_wt_data_stream_open (nghttp3_conn* conn,
13191322 int64_t session_id,
13201323 int64_t stream_id,
1321- void * conn_user_data,
1322- void * stream_user_data) {
1324+ void * conn_user_data,
1325+ void * stream_user_data) {
13231326 NGHTTP3_CALLBACK_SCOPE (app);
13241327 auto & session = app.session ();
1325- if (auto stream = FindOrCreateStream (conn, &session, stream_id)) [[likely]] {
1328+ if (auto stream = FindOrCreateStream (conn,
1329+ &session,
1330+ stream_id)) [[likely]] {
13261331 if (!app.MakeWebtransportStream (*stream.get (), session_id)) {
1327- stream->Destroy (); // close stream forcefully, TODO may be use an assert instead?
1332+ stream->Destroy (); // close stream forcefully
13281333 return NGHTTP3_ERR_CALLBACK_FAILURE ;
13291334 }
13301335 stream->NotifyWTSession (session_id);
@@ -1333,16 +1338,18 @@ class Http3ApplicationImpl final : public Session::Application {
13331338 return NGHTTP3_ERR_CALLBACK_FAILURE ;
13341339 }
13351340
1336- static int on_recv_wt_close_session (nghttp3_conn * conn,
1341+ static int on_recv_wt_close_session (nghttp3_conn* conn,
13371342 int64_t session_id,
13381343 uint32_t wt_error_code,
1339- const uint8_t * msg,
1344+ const uint8_t * msg,
13401345 size_t msglen,
1341- void * conn_user_data,
1342- void * stream_user_data) {
1346+ void * conn_user_data,
1347+ void * stream_user_data) {
13431348 NGHTTP3_CALLBACK_SCOPE (app);
13441349 auto & session = app.session ();
1345- if (auto stream = FindOrCreateStream (conn, &session, session_id)) [[likely]] {
1350+ if (auto stream = FindOrCreateStream (conn,
1351+ &session,
1352+ session_id)) [[likely]] {
13461353 stream->NotifyWTSessionClose (wt_error_code, msg, msglen);
13471354 return NGTCP2_SUCCESS ;
13481355 }
@@ -1531,7 +1538,7 @@ class Http3ApplicationImpl final : public Session::Application {
15311538
15321539 static constexpr nghttp3_callbacks kCallbacks = {
15331540 on_acked_stream_data,
1534- nullptr , // nghttp3_stream_close (deprecated)
1541+ nullptr , // nghttp3_stream_close (deprecated)
15351542 on_receive_data,
15361543 on_deferred_consume,
15371544 on_begin_headers,
0 commit comments