Marten Seemann
be4838bd64
wire: remove FrameParser interface, expose FrameParser struct ( #4284 )
...
Instead, expose the FrameParser struct. This allows us to embed it
directly into the connection struct, avoiding a pointer indirection.
2024-01-28 22:34:28 -08:00
Marten Seemann
940feef063
only log the discarding of Handshake keys once ( #4274 )
2024-01-28 20:51:22 -08:00
Marten Seemann
cb1775a08a
send out the CONNECTION_REFUSED error when refusing a connection ( #4250 )
...
So far, we used Connection.destroy, which destroys a connection without
sending out a CONNECTION_CLOSE frame. This is useful (for example) when
receiving a stateless reset, but it's not what we want when the server
refuses an incoming connection. In this case, we want to send out a
packet with a CONNECTION_CLOSE frame to inform the client that the
connection attempt is being rejected.
2024-01-18 22:29:22 -08:00
Marten Seemann
b3eb375bc1
remove shutdown method on the Connection ( #4249 )
...
There's no need to have a dedicated shutdown method, as the use case
(shutting down an outgoing connection attempt on context cancellation)
can be achieved by using Connection.destroy.
2024-01-18 22:06:04 -08:00
Marten Seemann
1fce81f8bb
queue up to 32 DATAGRAM frames to send ( #4222 )
2023-12-31 19:58:41 -08:00
Marten Seemann
22411e16d5
utils: switch to standard library min and max functions ( #4218 )
...
These functions were added in Go 1.21.
2023-12-27 21:19:13 -08:00
Benedikt Spies
31a677cacd
qlog: add support for alpn_information event ( #4216 )
...
* qlog chosen alpn
* qlog chosen alpn
* qlog: fix capitalization of ALPN
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-12-25 21:02:47 -08:00
Benedikt Spies
45922f76d6
reduce calls to time.Now() calls in connection ( #4191 )
2023-12-06 06:00:58 -08:00
chungthuang
7b9d21fbe6
send large max_datagram_frame size, introduce a DatagramTooLargeError error ( #4143 )
...
The size can be overwritten to a lower value for testing.
2023-12-02 06:27:15 -08:00
Marten Seemann
3bf2e19d0d
logging: pass the packet number to ConnectionTracer.DroppedPacket ( #4171 )
...
In most cases the packet number is not known when a packet is dropped,
but it's useful to log the packet number when dropping a duplicate
packet.
2023-11-17 04:11:16 -08:00
Marten Seemann
1c631cf9cb
rename Connection.{Send,Receive}Message to {Send,Receive}Datagram ( #4116 )
...
This is more consistent with both the RFC and the rest of the API. For
example, the option in the Config is already name EnableDatagrams, and
the property in the ConnectionState is named SupportsDatagrams.
2023-10-24 21:18:09 -07:00
Marten Seemann
9b82196578
make the logging.Tracer and logging.ConnectionTracer a struct ( #4082 )
2023-09-16 04:58:51 -07:00
Benedikt Spies
37a3c417a7
expose GSO usage through ConnectionState ( #4083 )
2023-09-13 23:55:49 -07:00
Marten Seemann
b6ce91bfe7
stop appending to a GSO batch when the ECN marking changes
2023-09-11 21:14:53 +07:00
Marten Seemann
ad63e2a40a
trace and qlog the ECN marking on sent and received packets
2023-09-11 20:31:50 +07:00
Marten Seemann
bed8ebbd4c
distinguish coalesced and 1-RTT packets when determining ECN mode
2023-09-11 20:31:50 +07:00
Marten Seemann
b73a4de7ea
only add an ECN control message if ECN is supported
2023-09-11 20:31:50 +07:00
Marten Seemann
5dd6d91c11
send and track packets with ECN markings
2023-09-11 20:31:50 +07:00
Marten Seemann
54b76ceb3e
ackhandler: use the receive time of the Retry packet for RTT estimation ( #4070 )
2023-09-09 06:12:19 -07:00
Marten Seemann
dc0369cad4
remove TLS post-handshake message reassembly logic ( #4073 )
...
Go 1.21.1 was released, which fixed the bug that made this workaround
necessary.
2023-09-06 21:27:03 -07:00
Marten Seemann
090e505aa9
move GSO control message handling to the oobConn ( #4056 )
...
* move GSO control message handling to the oobConn
* disable OOB test on Windows
* improve GSO tests
* update ooConn.WritePacket comment
2023-08-31 00:49:27 -07:00
Marten Seemann
5c5db8cc59
reassemble post-handshake TLS messages before passing them to crypto/tls ( #4038 )
2023-08-18 17:16:57 -07:00
Marten Seemann
aab4d4e410
fix handling of ACK frames serialized after CRYPTO frames ( #4018 )
2023-08-05 18:48:53 -04:00
Marten Seemann
26c6fcc549
add error handling when confirming handshake on HANDSHAKE_DONE frames ( #4017 )
2023-08-05 07:02:24 -07:00
Ameagari
1c47ebefc0
check transport parameters after 0-RTT resumption ( #3985 )
...
* check new transport parameters do not contain redueced limits
* redefine ValidForUpdate and add tests
* fix test assertion and update comment
2023-08-01 18:34:42 -07:00
Marten Seemann
f3a0ce1599
set a net.Conn with the correct addresses on the tls.ClientHelloInfo ( #4001 )
2023-07-31 13:32:10 -07:00
Marten Seemann
469a6153b6
use a synchronous API for the crypto setup ( #3939 )
2023-07-21 10:00:42 -07:00
Ferdinand Holzer
4378283f95
surface connection error as connection context cancelation cause ( #3961 )
...
* connection: surface connection error as connection context cancellation cause
* docs: add note about connection context canellation cause
2023-07-17 21:31:31 -07:00
Marten Seemann
3d89e545d3
use the new crypto/tls QUIC Transport ( #3860 )
2023-07-01 11:15:00 -07:00
Glonee
435444af7e
add a context to Connection.ReceiveMessage ( #3926 )
...
* add context to ReceiveMessage
* add newlines
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-06-27 11:29:30 -07:00
Benedikt Spies
f3875147b9
log STREAM frames in long header packets ( #3922 )
2023-06-26 15:51:56 -07:00
Benedikt Spies
f57f876446
respect minimum idle timeout of 3 PTOs ( #3909 )
2023-06-20 01:47:29 -07:00
Marten Seemann
5225a104d4
retransmission queue: simplify queueing of PING frames
2023-06-05 21:07:02 +03:00
Marten Seemann
da55dfaabd
ackhandler: unexport Packet
2023-06-05 21:06:58 +03:00
Marten Seemann
edaeed0107
embed the packetInfo in the receivedPacket struct
...
This avoid allocating the packetInfo struct when receiving a packet.
2023-06-03 10:44:16 +03:00
Marten Seemann
b27d114f07
pass the current timestamp to the pacer instead of calling time.Now() ( #3824 )
2023-06-03 00:26:30 -07:00
Marten Seemann
072a602cc1
pass around receivedPacket as struct instead of as pointer ( #3823 )
2023-06-03 00:08:58 -07:00
Marten Seemann
591ab1ab5e
packer: reduce number of calls to time.Now() when packing packets ( #3815 )
2023-06-02 23:58:41 -07:00
Marten Seemann
56432a8b79
ci: run linter on all supported platforms ( #3816 )
...
* only define packetInfo.ifIndex on platforms where it's actually used
* fix comment and stylecheck for IP_DONTFRAGMENT on Windows
* fix build flags on test file
* ci: run golangci-lint on multiple platforms
2023-06-02 23:47:05 -07:00
Marten Seemann
5b5ffa942b
pack packets into large buffers when GSO is available
2023-06-03 09:21:55 +03:00
Marten Seemann
628ba87727
append to a given buffer when packing a packet
2023-06-03 09:21:54 +03:00
Marten Seemann
b0524c1241
split code paths for packing normal and ACK-only packets
2023-06-02 18:35:02 +03:00
Marten Seemann
db4e929ccf
connection: only queue flow control frames once when sending a batch
2023-06-02 18:35:02 +03:00
Marten Seemann
d1bbde3580
connection: move sending of MTU probe packets out of the fast path
2023-06-02 18:35:02 +03:00
Marten Seemann
499c8e4c33
connection: introduce a fast path for packing and sending many packets
2023-06-02 18:35:02 +03:00
Marten Seemann
9d70bc24a5
simplify pacing logic by introducing a SendPacingLimited send mode
2023-06-02 18:35:02 +03:00
Marten Seemann
470ae7b39b
enable packet pacing, for packets sent before handshake completion
...
It's not clear why this was disabled so far. The pacer should have some
allowance for bursts, and it is expected that the handshake flights fit into
this burst budget and therefore won't be delayed by the pacer.
However, when using 0-RTT, it actually makes sense to start pacing right
away, to avoid inducing packet loss very early in the connection.
2023-06-02 18:35:02 +03:00
Marten Seemann
39ae200972
enable GSO on Linux, if available
2023-06-02 18:35:02 +03:00
Marten Seemann
bef0f3d31a
pass the maximum packet size from MTU discoverer to packet packer
2023-06-02 18:35:02 +03:00
Marten Seemann
ecaef04695
initialize the MTU discoverer immediately
2023-06-02 18:35:02 +03:00