Lines Matching refs:TcpSocket
21 pub struct TcpSocket { struct
22 sys: sys::tcp::TcpSocket, argument
48 impl TcpSocket { implementation
52 pub fn new_v4() -> io::Result<TcpSocket> { in new_v4()
53 sys::tcp::new_v4_socket().map(|sys| TcpSocket { sys }) in new_v4()
59 pub fn new_v6() -> io::Result<TcpSocket> { in new_v6()
60 sys::tcp::new_v6_socket().map(|sys| TcpSocket { sys }) in new_v6()
63 pub(crate) fn new_for_addr(addr: SocketAddr) -> io::Result<TcpSocket> { in new_for_addr() argument
65 TcpSocket::new_v4() in new_for_addr()
67 TcpSocket::new_v6() in new_for_addr()
332 impl Drop for TcpSocket { implementation
339 impl IntoRawFd for TcpSocket { implementation
349 impl AsRawFd for TcpSocket { implementation
356 impl FromRawFd for TcpSocket { implementation
363 unsafe fn from_raw_fd(fd: RawFd) -> TcpSocket { in from_raw_fd() argument
364 TcpSocket { sys: fd } in from_raw_fd()
369 impl IntoRawSocket for TcpSocket { implementation
385 impl AsRawSocket for TcpSocket { implementation
392 impl FromRawSocket for TcpSocket { implementation
399 unsafe fn from_raw_socket(socket: RawSocket) -> TcpSocket { in from_raw_socket() argument
400 TcpSocket { in from_raw_socket()
401 sys: socket as sys::tcp::TcpSocket, in from_raw_socket()