Struct tokio_kcp::KcpListener
[−]
[src]
pub struct KcpListener { /* fields omitted */ }
A KCP Socket server
Methods
impl KcpListener
[src]
fn bind_with_config(
addr: &SocketAddr,
handle: &Handle,
config: KcpConfig
) -> Result<KcpListener>
addr: &SocketAddr,
handle: &Handle,
config: KcpConfig
) -> Result<KcpListener>
Creates a new KcpListener
which will be bound to the specific address.
The returned listener is ready for accepting connections.
fn bind(addr: &SocketAddr, handle: &Handle) -> Result<KcpListener>
Creates a new KcpListener
which will be bound to the specific address with default config.
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<(ServerKcpStream, SocketAddr)>
Accept a new incoming connection from this listener.
fn incoming(self) -> Incoming
Returns an iterator over the connections being received on this listener.