Lines Matching refs:Endpoint

13         event_poll::EPollEventType, net_core::poll_ifaces, Endpoint, Protocol, ShutdownType,
107 fn read(&self, buf: &mut [u8]) -> (Result<usize, SystemError>, Endpoint) { in read() argument
120 Endpoint::Ip(Some(wire::IpEndpoint { in read()
129 return (Err(SystemError::EAGAIN_OR_EWOULDBLOCK), Endpoint::Ip(None)); in read()
138 fn write(&self, buf: &[u8], to: Option<Endpoint>) -> Result<usize, SystemError> { in write()
155 if let Some(Endpoint::Ip(Some(endpoint))) = to { in write()
214 fn connect(&mut self, _endpoint: Endpoint) -> Result<(), SystemError> { in connect()
245 remote_endpoint: Option<Endpoint>, // 记录远程endpoint提供给connect(), 应该使用IP地址。
296 fn do_bind(&self, socket: &mut udp::Socket, endpoint: Endpoint) -> Result<(), SystemError> { in do_bind()
297 if let Endpoint::Ip(Some(mut ip)) = endpoint { in do_bind()
338 fn read(&self, buf: &mut [u8]) -> (Result<usize, SystemError>, Endpoint) { in read() argument
352 return (Ok(size), Endpoint::Ip(Some(metadata.endpoint))); in read()
363 fn write(&self, buf: &[u8], to: Option<Endpoint>) -> Result<usize, SystemError> { in write()
366 if let Some(Endpoint::Ip(Some(ref endpoint))) = to { in write()
368 } else if let Some(Endpoint::Ip(Some(ref endpoint))) = self.remote_endpoint { in write()
400 fn bind(&mut self, endpoint: Endpoint) -> Result<(), SystemError> { in bind()
421 fn connect(&mut self, endpoint: Endpoint) -> Result<(), SystemError> { in connect()
422 if let Endpoint::Ip(_) = endpoint { in connect()
448 fn endpoint(&self) -> Option<Endpoint> { in endpoint() argument
465 return Some(Endpoint::Ip(Some(result))); in endpoint()
469 fn peer_endpoint(&self) -> Option<Endpoint> { in peer_endpoint() argument
618 fn read(&self, buf: &mut [u8]) -> (Result<usize, SystemError>, Endpoint) { in read() argument
626 return (Err(SystemError::ENOTCONN), Endpoint::Ip(None)); in read()
640 return (Err(SystemError::ENOTCONN), Endpoint::Ip(None)); in read()
650 return (Err(SystemError::ENOTCONN), Endpoint::Ip(None)); in read()
655 return (Ok(size), Endpoint::Ip(Some(endpoint))); in read()
660 return (Err(SystemError::ENOTCONN), Endpoint::Ip(None)); in read()
670 return (Err(SystemError::ENOTCONN), Endpoint::Ip(None)); in read()
674 return (Err(SystemError::ENOTCONN), Endpoint::Ip(None)); in read()
682 fn write(&self, buf: &[u8], _to: Option<Endpoint>) -> Result<usize, SystemError> { in write()
743 fn connect(&mut self, endpoint: Endpoint) -> Result<(), SystemError> { in connect()
750 if let Endpoint::Ip(Some(ip)) = endpoint { in connect()
853 fn bind(&mut self, endpoint: Endpoint) -> Result<(), SystemError> { in bind()
854 if let Endpoint::Ip(Some(mut ip)) = endpoint { in bind()
881 fn accept(&mut self) -> Result<(Box<dyn Socket>, Endpoint), SystemError> { in accept() argument
955 return Ok((sock_ret, Endpoint::Ip(Some(remote_ep)))); in accept()
966 fn endpoint(&self) -> Option<Endpoint> { in endpoint() argument
967 let mut result: Option<Endpoint> = self.local_endpoint.map(|x| Endpoint::Ip(Some(x))); in endpoint()
976 result = Some(Endpoint::Ip(Some(ep))); in endpoint()
982 fn peer_endpoint(&self) -> Option<Endpoint> { in peer_endpoint() argument
988 return socket.remote_endpoint().map(|x| Endpoint::Ip(Some(x))); in peer_endpoint()