-
Notifications
You must be signed in to change notification settings - Fork 49
Conversation
a4536e2
to
16932e3
Compare
52d6086
to
57af916
Compare
@@ -98,6 +99,10 @@ class UDPWrapBase { | |||
// Stores the sockaddr for the local socket in `name`. | |||
virtual int GetSockName(sockaddr* name, int* namelen) = 0; | |||
|
|||
virtual SocketAddress* GetPeerName(SocketAddress* addr = nullptr) = 0; | |||
|
|||
virtual SocketAddress* GetSockName(SocketAddress* addr = nullptr) = 0; |
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.
This should be fine, but in the long run either the SocketAddress*
variants or the sockaddr*
variants should become non-virtual and implemented in terms of the other, I guess.
Also, could these maybe just return a SocketAddress
instead of taking a pointer argument that doubles as the return value?
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.
+1 to the first part... will look at that in a future PR.
For the second part, I'll look at that but the current use of this in node_quic_socket.cc updates a member variable of QuicSocket
...
udp_->GetSockName(&local_address_);
The return value isn't actually used. I set it up this way just to give some flexibility that we may not actually need in the long run. That is, we could alternatively just drop the return value.
eacc82c
to
58a1cd2
Compare
Allow for better future reuse of sockaddr related code by moving SocketAddress into it's own header
Allows monitoring the number of times packets have to be retransmitted because of loss or delayed ack. An implementation experiencing a high number of retransmits may need to be torn down or mitigated in some way. This allows the user code to keep track. Later, we may want to add a setting that enforces a maximum number of retransmissions before failing a connection. Fixes: nodejs#78
89cad7e
to
04dd27d
Compare
51968d1
to
85c628c
Compare
Allows monitoring the number of times packets have to be retransmitted because of loss or delayed ack. An implementation experiencing a high number of retransmits may need to be torn down or mitigated in some way. This allows the user code to keep track. Later, we may want to add a setting that enforces a maximum number of retransmissions before failing a connection. Fixes: #78 PR-URL: #207 Reviewed-By: #207
Landed |
Allows monitoring the number of times packets have to be retransmitted because of loss or delayed ack. An implementation experiencing a high number of retransmits may need to be torn down or mitigated in some way. This allows the user code to keep track. Later, we may want to add a setting that enforces a maximum number of retransmissions before failing a connection. Fixes: #78 PR-URL: #207 Reviewed-By: #207
Refactoring and cleanup of utility bits and pieces.