From 324ad3564ba42a5106be77a06d0cd52290e1cd22 Mon Sep 17 00:00:00 2001 From: Ian Gudger Date: Mon, 15 Oct 2018 20:21:06 -0700 Subject: 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 --- pkg/tcpip/transport/unix/unix.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkg/tcpip/transport/unix/unix.go') 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 -- cgit v1.2.3