Struct tokio_utp::UtpSocket
[−]
[src]
pub struct UtpSocket { /* fields omitted */ }
A uTP socket. Can be used to make outgoing connections.
Methods
impl UtpSocket
[src]
fn bind(addr: &SocketAddr, handle: &Handle) -> Result<(UtpSocket, UtpListener)>
[src]
Bind a new UtpSocket
to the given socket address
fn local_addr(&self) -> Result<SocketAddr>
[src]
Gets the local address that the socket is bound to.
fn from_socket(
socket: UdpSocket,
handle: &Handle
) -> Result<(UtpSocket, UtpListener)>
[src]
socket: UdpSocket,
handle: &Handle
) -> Result<(UtpSocket, UtpListener)>
Create a new Utpsocket
backed by the provided UdpSocket
.
fn connect(&self, addr: &SocketAddr) -> UtpStreamConnect
[src]
Connect a new UtpSocket
to the given remote socket address
fn finalize(self) -> UtpSocketFinalize
[src]
Consume the socket and the convert it to a future which resolves once all connections have been closed gracefully.