public class BioUdpServer extends AbstractUdpServer
AbstractIoService.ServiceStateconfig, ioHandlerExecutor| Constructor and Description |
|---|
BioUdpServer()
Create an UDP server
|
BioUdpServer(IoHandlerExecutor executor) |
BioUdpServer(UdpSessionConfig config,
IoHandlerExecutor executor) |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(int port)
Binds the server to the specified port.
|
void |
bind(SocketAddress localAddress)
Binds to the specified local addresses and start to accept incoming connections.
|
IoFuture<IoSession> |
connect(SocketAddress remoteAddress)
Connects to the specified remote address.
|
SocketAddress |
getBoundAddress()
Returns the local addresses which are bound currently.
|
DatagramChannel |
getDatagramChannel() |
void |
unbind()
Unbinds from the local addresses that this service is bound to and stops to accept incoming connections.
|
getSessionConfig, initSecured, setSessionConfigisReuseAddress, setReuseAddress, setSessionConfigfireServiceActivated, fireServiceInactivated, getFilters, getIoHandler, getIoHandlerExecutor, getManagedSessions, initState, isActive, isCreated, isDisposed, isDisposing, isSuspended, setActive, setCreated, setDisposed, setDisposing, setFilters, setIoHandler, setSuspendedpublic BioUdpServer()
public BioUdpServer(IoHandlerExecutor executor)
public BioUdpServer(UdpSessionConfig config, IoHandlerExecutor executor)
public DatagramChannel getDatagramChannel()
public SocketAddress getBoundAddress()
IoServerpublic void bind(SocketAddress localAddress)
IoServerpublic void bind(int port)
IoServerport - the local TCP port to bind.public void unbind()
IoServerpublic IoFuture<IoSession> connect(SocketAddress remoteAddress)
IoClientremoteAddress - Remote SocketAddress to connectIoFuture instance which is completed when the connection attempt initiated by this call
succeeds or fails.Copyright © 2009–2013 Apache MINA Project. All rights reserved.