// Readiness implements tcpip.Endpoint.Readiness.
Readiness implements tcpip.Endpoint.Readiness.
// Readiness implements tcpip . Endpoint . Readiness .
func (e *endpoint) Readiness(mask waiter.EventMask) waiter.EventMask {
	result := waiter.WritableEvents & mask
	if (mask & waiter.ReadableEvents) != 0 {
		e.rcvMu.Lock()
		if !e.rcvList.Empty() || e.rcvClosed {
			result |= waiter.ReadableEvents
		}
		e.rcvMu.Unlock()
	}
	return result
}
func ( e * endpoint ) Readiness ( mask waiter . EventMask ) waiter . EventMask { result := waiter . WritableEvents & mask if ( mask & waiter . ReadableEvents ) != 0 { e . rcvMu . Lock ( ) if ! e . rcvList . Empty ( ) || e . rcvClosed { result |= waiter . ReadableEvents } e . rcvMu . Unlock ( ) } return result }
Readiness implements tcpip.Endpoint.Readiness.
Readiness implements tcpip . Endpoint . Readiness .
// The endpoint is always writable. // Determine whether the endpoint is readable.