mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-09 00:00:08 +02:00
uds: minor doc fix in UnixStream and UnixDatagram (#754)
This commit is contained in:
committed by
Carl Lerche
parent
33a216e4c1
commit
c83355235c
@@ -31,8 +31,8 @@ impl UnixDatagram {
|
|||||||
/// Creates an unnamed pair of connected sockets.
|
/// Creates an unnamed pair of connected sockets.
|
||||||
///
|
///
|
||||||
/// This function will create a pair of interconnected Unix sockets for
|
/// This function will create a pair of interconnected Unix sockets for
|
||||||
/// communicating back and forth between one another. Each socket will be
|
/// communicating back and forth between one another. Each socket will
|
||||||
/// associated with the event loop whose handle is also provided.
|
/// be associated with the default event loop's handle.
|
||||||
pub fn pair() -> io::Result<(UnixDatagram, UnixDatagram)> {
|
pub fn pair() -> io::Result<(UnixDatagram, UnixDatagram)> {
|
||||||
let (a, b) = mio_uds::UnixDatagram::pair()?;
|
let (a, b) = mio_uds::UnixDatagram::pair()?;
|
||||||
let a = UnixDatagram::new(a);
|
let a = UnixDatagram::new(a);
|
||||||
|
|||||||
@@ -76,8 +76,8 @@ impl UnixStream {
|
|||||||
/// Creates an unnamed pair of connected sockets.
|
/// Creates an unnamed pair of connected sockets.
|
||||||
///
|
///
|
||||||
/// This function will create a pair of interconnected Unix sockets for
|
/// This function will create a pair of interconnected Unix sockets for
|
||||||
/// communicating back and forth between one another. Each socket will be
|
/// communicating back and forth between one another. Each socket will
|
||||||
/// associated with the event loop whose handle is also provided.
|
/// be associated with the default event loop's handle.
|
||||||
pub fn pair() -> io::Result<(UnixStream, UnixStream)> {
|
pub fn pair() -> io::Result<(UnixStream, UnixStream)> {
|
||||||
let (a, b) = try!(mio_uds::UnixStream::pair());
|
let (a, b) = try!(mio_uds::UnixStream::pair());
|
||||||
let a = UnixStream::new(a);
|
let a = UnixStream::new(a);
|
||||||
@@ -111,7 +111,7 @@ impl UnixStream {
|
|||||||
self.io.get_ref().peer_addr()
|
self.io.get_ref().peer_addr()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns effective credentials of the process which called `connect` or `socketpair`.
|
/// Returns effective credentials of the process which called `connect` or `pair`.
|
||||||
pub fn peer_cred(&self) -> io::Result<UCred> {
|
pub fn peer_cred(&self) -> io::Result<UCred> {
|
||||||
ucred::get_peer_cred(self)
|
ucred::get_peer_cred(self)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user