// GetSockOptInt implements tcpip.Endpoint.GetSockOptInt.
GetSockOptInt implements tcpip.Endpoint.GetSockOptInt.
// GetSockOptInt implements tcpip . Endpoint . GetSockOptInt .
func (e *endpoint) GetSockOptInt(opt tcpip.SockOptInt) (int, tcpip.Error) {
	switch opt {
	case tcpip.ReceiveQueueSizeOption:
		v := 0
		e.rcvMu.Lock()
		if !e.rcvList.Empty() {
			p := e.rcvList.Front()
			v = p.data.Size()
		}
		e.rcvMu.Unlock()
		return v, nil
	default:
		return -1, &tcpip.ErrUnknownProtocolOption{}
	}
}
func ( e * endpoint ) GetSockOptInt ( opt tcpip . SockOptInt ) ( int , tcpip . Error ) { switch opt { case tcpip . ReceiveQueueSizeOption : v := 0 e . rcvMu . Lock ( ) if ! e . rcvList . Empty ( ) { p := e . rcvList . Front ( ) v = p . data . Size ( ) } e . rcvMu . Unlock ( ) return v , nil default : return - 1 , & tcpip . ErrUnknownProtocolOption { } } }
GetSockOptInt implements tcpip.Endpoint.GetSockOptInt.
GetSockOptInt implements tcpip . Endpoint . GetSockOptInt .