diff options
author | Ian Gudger <igudger@google.com> | 2018-10-15 20:21:06 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-10-15 20:23:18 -0700 |
commit | 324ad3564ba42a5106be77a06d0cd52290e1cd22 (patch) | |
tree | c68b07dfe445ec87ff40a1f2a1721cef3e72e6f7 /pkg/tcpip | |
parent | 167f2401c4abb1ebda1f4536a04d9854e9008e0b (diff) |
Refactor host.ConnectedEndpoint
* Integrate recvMsg and sendMsg functions into Recv and Send respectively as
they are no longer shared.
* Clean up partial read/write error handling code.
* Re-order code to make sense given that there is no longer a host.endpoint
type.
PiperOrigin-RevId: 217255072
Change-Id: Ib43fe9286452f813b8309d969be11f5fa40694cd
Diffstat (limited to 'pkg/tcpip')
-rw-r--r-- | pkg/tcpip/transport/unix/unix.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/tcpip/transport/unix/unix.go b/pkg/tcpip/transport/unix/unix.go index 718606cd1..1bca4b0b4 100644 --- a/pkg/tcpip/transport/unix/unix.go +++ b/pkg/tcpip/transport/unix/unix.go @@ -562,6 +562,9 @@ type ConnectedEndpoint interface { // Send sends a single message. This method does not block. // // notify indicates if SendNotify should be called. + // + // tcpip.ErrWouldBlock can be returned along with a partial write if + // the caller should block to send the rest of the data. Send(data [][]byte, controlMessages ControlMessages, from tcpip.FullAddress) (n uintptr, notify bool, err *tcpip.Error) // SendNotify notifies the ConnectedEndpoint of a successful Send. This |