Inline socket function implementations
This commit is contained in:
parent
174c0e86ca
commit
3abc30719e
@ -184,6 +184,7 @@ pub fn connect_timeout(_: &SocketAddr, _: Duration) -> io::Result<TcpStream> {
|
|||||||
unimpl!();
|
unimpl!();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
pub fn socket(&self) -> &Socket {
|
pub fn socket(&self) -> &Socket {
|
||||||
&self.inner
|
&self.inner
|
||||||
}
|
}
|
||||||
@ -306,6 +307,7 @@ pub fn bind(_: io::Result<&SocketAddr>) -> io::Result<TcpListener> {
|
|||||||
unimpl!();
|
unimpl!();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
pub fn socket(&self) -> &Socket {
|
pub fn socket(&self) -> &Socket {
|
||||||
&self.inner
|
&self.inner
|
||||||
}
|
}
|
||||||
@ -372,6 +374,7 @@ pub fn bind(_: io::Result<&SocketAddr>) -> io::Result<UdpSocket> {
|
|||||||
unimpl!();
|
unimpl!();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
pub fn socket(&self) -> &Socket {
|
pub fn socket(&self) -> &Socket {
|
||||||
&self.inner
|
&self.inner
|
||||||
}
|
}
|
||||||
|
@ -185,6 +185,7 @@ pub fn set_nonblocking(&self, state: bool) -> io::Result<()> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
pub fn socket(&self) -> &Socket {
|
pub fn socket(&self) -> &Socket {
|
||||||
&self.inner
|
&self.inner
|
||||||
}
|
}
|
||||||
@ -275,6 +276,7 @@ pub fn set_nonblocking(&self, state: bool) -> io::Result<()> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
pub fn socket(&self) -> &Socket {
|
pub fn socket(&self) -> &Socket {
|
||||||
&self.inner
|
&self.inner
|
||||||
}
|
}
|
||||||
@ -438,6 +440,7 @@ pub fn connect(&self, _: io::Result<&SocketAddr>) -> io::Result<()> {
|
|||||||
unsupported()
|
unsupported()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
pub fn socket(&self) -> &Socket {
|
pub fn socket(&self) -> &Socket {
|
||||||
&self.inner
|
&self.inner
|
||||||
}
|
}
|
||||||
|
@ -239,6 +239,7 @@ pub fn connect_timeout(addr: &SocketAddr, timeout: Duration) -> io::Result<TcpSt
|
|||||||
Ok(TcpStream { inner: sock })
|
Ok(TcpStream { inner: sock })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
pub fn socket(&self) -> &Socket {
|
pub fn socket(&self) -> &Socket {
|
||||||
&self.inner
|
&self.inner
|
||||||
}
|
}
|
||||||
@ -428,6 +429,7 @@ pub fn bind(addr: io::Result<&SocketAddr>) -> io::Result<TcpListener> {
|
|||||||
Ok(TcpListener { inner: sock })
|
Ok(TcpListener { inner: sock })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
pub fn socket(&self) -> &Socket {
|
pub fn socket(&self) -> &Socket {
|
||||||
&self.inner
|
&self.inner
|
||||||
}
|
}
|
||||||
@ -518,6 +520,7 @@ pub fn bind(addr: io::Result<&SocketAddr>) -> io::Result<UdpSocket> {
|
|||||||
Ok(UdpSocket { inner: sock })
|
Ok(UdpSocket { inner: sock })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
pub fn socket(&self) -> &Socket {
|
pub fn socket(&self) -> &Socket {
|
||||||
&self.inner
|
&self.inner
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user