Struct tokio_kcp::KcpListener
[−]
[src]
pub struct KcpListener { /* fields omitted */ }
A KCP Socket server
Methods
impl KcpListener
[src]
fn bind(addr: &SocketAddr, handle: &Handle) -> Result<KcpListener>
Creates a new KcpListener
which will be bound to the specific address.
The returned listener is ready for accepting connections.
fn local_addr(&self) -> Result<SocketAddr>
Returns the local socket address of this listener.
fn accept(&mut self) -> Result<(KcpStream, SocketAddr)>
Accept a new incoming connection from this listener.
fn incoming(self) -> Incoming
Returns an iterator over the connections being received on this listener.