public class BioUdpServer extends AbstractUdpServer
AbstractIoService.ServiceState
config, 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, setSessionConfig
isReuseAddress, setReuseAddress, setSessionConfig
fireServiceActivated, fireServiceInactivated, getFilters, getIoHandler, getIoHandlerExecutor, getManagedSessions, initState, isActive, isCreated, isDisposed, isDisposing, isSuspended, setActive, setCreated, setDisposed, setDisposing, setFilters, setIoHandler, setSuspended
public BioUdpServer()
public BioUdpServer(IoHandlerExecutor executor)
public BioUdpServer(UdpSessionConfig config, IoHandlerExecutor executor)
public DatagramChannel getDatagramChannel()
public SocketAddress getBoundAddress()
IoServer
public void bind(SocketAddress localAddress)
IoServer
public void bind(int port)
IoServer
port
- the local TCP port to bind.public void unbind()
IoServer
public IoFuture<IoSession> connect(SocketAddress remoteAddress)
IoClient
remoteAddress
- 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.