mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-29 20:20:59 +03:00
Inline socket function implementations
This commit is contained in:
@@ -184,6 +184,7 @@ pub fn connect_timeout(_: &SocketAddr, _: Duration) -> io::Result<TcpStream> {
|
||||
unimpl!();
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn socket(&self) -> &Socket {
|
||||
&self.inner
|
||||
}
|
||||
@@ -306,6 +307,7 @@ pub fn bind(_: io::Result<&SocketAddr>) -> io::Result<TcpListener> {
|
||||
unimpl!();
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn socket(&self) -> &Socket {
|
||||
&self.inner
|
||||
}
|
||||
@@ -372,6 +374,7 @@ pub fn bind(_: io::Result<&SocketAddr>) -> io::Result<UdpSocket> {
|
||||
unimpl!();
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn socket(&self) -> &Socket {
|
||||
&self.inner
|
||||
}
|
||||
|
||||
@@ -185,6 +185,7 @@ pub fn set_nonblocking(&self, state: bool) -> io::Result<()> {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn socket(&self) -> &Socket {
|
||||
&self.inner
|
||||
}
|
||||
@@ -275,6 +276,7 @@ pub fn set_nonblocking(&self, state: bool) -> io::Result<()> {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn socket(&self) -> &Socket {
|
||||
&self.inner
|
||||
}
|
||||
@@ -438,6 +440,7 @@ pub fn connect(&self, _: io::Result<&SocketAddr>) -> io::Result<()> {
|
||||
unsupported()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn socket(&self) -> &Socket {
|
||||
&self.inner
|
||||
}
|
||||
|
||||
@@ -239,6 +239,7 @@ pub fn connect_timeout(addr: &SocketAddr, timeout: Duration) -> io::Result<TcpSt
|
||||
Ok(TcpStream { inner: sock })
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn socket(&self) -> &Socket {
|
||||
&self.inner
|
||||
}
|
||||
@@ -428,6 +429,7 @@ pub fn bind(addr: io::Result<&SocketAddr>) -> io::Result<TcpListener> {
|
||||
Ok(TcpListener { inner: sock })
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn socket(&self) -> &Socket {
|
||||
&self.inner
|
||||
}
|
||||
@@ -518,6 +520,7 @@ pub fn bind(addr: io::Result<&SocketAddr>) -> io::Result<UdpSocket> {
|
||||
Ok(UdpSocket { inner: sock })
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn socket(&self) -> &Socket {
|
||||
&self.inner
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user