public static class NonBlockingTcpDatagramSocket.Impl extends TcpDatagramSocket.Impl
TcpDatagramSocket.Impl
which provides non-blocking functionality, see send(DatagramPacket)
.HEADER_SIZE, PROTOCOL_MAGIC
fd, localPort
IP_MULTICAST_IF, IP_MULTICAST_IF2, IP_MULTICAST_LOOP, IP_TOS, SO_BINDADDR, SO_BROADCAST, SO_KEEPALIVE, SO_LINGER, SO_OOBINLINE, SO_RCVBUF, SO_REUSEADDR, SO_SNDBUF, SO_TIMEOUT, TCP_NODELAY
Constructor and Description |
---|
Impl()
Creates a new Impl.
|
Impl(com.oracle.common.net.SocketProvider provider)
Creates a new Impl using a
provider . |
Modifier and Type | Method and Description |
---|---|
protected com.tangosol.net.TcpDatagramSocket.Impl.Connection |
makeConnection(SocketAddress addr)
Produce a new Connection for the specified destination address.
|
protected com.tangosol.net.TcpDatagramSocket.Impl.Connection |
makeConnection(SocketChannel chan)
Make a connection from an existing channel.
|
protected boolean |
onConnectionHeader(com.tangosol.net.TcpDatagramSocket.Impl.ConnectionStatus status, SocketChannel chan)
Process a pending connection header.
|
protected void |
send(DatagramPacket packet) |
bind, bind, close, closeInbound, closeOutbound, create, ensureConnection, ensureSocketException, getLocalPort, getOption, getTimeToLive, getTTL, join, joinGroup, leave, leaveGroup, logException, logProtocolWarning, nextKey, onAccept, onRead, peek, peekData, processRegistrations, provider, receive, scheduleRegistration, setOption, setPacketMagic, setTimeToLive, setTTL, toString, transferBytes
connect, disconnect, getFileDescriptor
public Impl() throws SocketException
SocketException
- if any error happens during the bind, or if the port is unavailablepublic Impl(com.oracle.common.net.SocketProvider provider) throws SocketException
provider
.provider
- the provider
used to create internal socketsSocketException
- if any error happens during the bind, or if the port is unavailableprotected boolean onConnectionHeader(com.tangosol.net.TcpDatagramSocket.Impl.ConnectionStatus status, SocketChannel chan) throws IOException
onConnectionHeader
in class TcpDatagramSocket.Impl
status
- the associated ConnectionStatuschan
- the associated channelIOException
- if an I/O error occursprotected com.tangosol.net.TcpDatagramSocket.Impl.Connection makeConnection(SocketChannel chan) throws IOException
chan
- the channelIOException
- if an I/O error occursprotected com.tangosol.net.TcpDatagramSocket.Impl.Connection makeConnection(SocketAddress addr) throws IOException
makeConnection
in class TcpDatagramSocket.Impl
addr
- the destination addressIOException
- if an I/O error occursprotected void send(DatagramPacket packet) throws IOException
send
in class TcpDatagramSocket.Impl
IOException