public interface NioServer extends NioManager
Modifier and Type | Method and Description |
---|---|
AbstractNioManager.NioServerIdentifier |
accept(java.net.InetSocketAddress address,
NioAcceptCallback acceptCallback)
Start accepting connections on a given address.
|
void |
stop(AbstractNioManager.NioServerIdentifier serverIdentifier)
Stop listening.
|
disconnect, send, shutdown
AbstractNioManager.NioServerIdentifier accept(java.net.InetSocketAddress address, NioAcceptCallback acceptCallback) throws java.net.BindException
address
- The InetSocketAddress to listen on.acceptCallback
- The NioAcceptCallback to notify when a connection has been accepted or errored
out.java.net.BindException
- if the address is already in use.void stop(AbstractNioManager.NioServerIdentifier serverIdentifier)
serverIdentifier
- The identifier given to the listener when it called accept().