-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Extend UdpPacketWriter interface for advanced writers #41604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -97,10 +97,13 @@ ActiveQuicListener::ActiveQuicListener( | |
| per_worker_stats_, dispatcher, listen_socket_, quic_stat_names, crypto_server_stream_factory_, | ||
| *connection_id_generator_, debug_visitor_factory); | ||
|
|
||
| absl::AnyInvocable<void() &&> on_can_write_cb = [&]() { quic_dispatcher_->OnCanWrite(); }; | ||
|
|
||
| // Create udp_packet_writer | ||
| Network::UdpPacketWriterPtr udp_packet_writer = | ||
| listener_config.udpListenerConfig()->packetWriterFactory().createUdpPacketWriter( | ||
| listen_socket_.ioHandle(), listener_config.listenerScope()); | ||
| listen_socket_.ioHandle(), listener_config.listenerScope(), dispatcher, | ||
| std::move(on_can_write_cb)); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I might have missed it, but do we have a unit test which ensures that this CB is sent correctly to the writer? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, we don't have a unit test for the cb because this change is interface only, the concrete implementation using the cb will come in followup cl. |
||
| udp_packet_writer_ = udp_packet_writer.get(); | ||
|
|
||
| // Some packet writers (like `UdpGsoBatchWriter`) already directly implement | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add comments for the new parameters (
dispacteris pretty obvious, buton_can_write_cbis less so)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added comments for new params and updated existing comments because the "socket" param is outdated