|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
java.net.DatagramSocket
com.tangosol.net.TcpDatagramSocket
public class TcpDatagramSocket
TCP based datagram socket implementation.
Nested Class Summary | |
---|---|
static class |
TcpDatagramSocket.Impl A specialized version of DatagramSocketImpl . |
Field Summary | |
---|---|
static int |
IO_EXCEPTIONS_LOG_LEVEL Debbuging flag for logging an IO exceptions which occur, set to a negative to disable the logging. |
protected TcpDatagramSocket.Impl |
m_impl |
Constructor Summary | |
---|---|
|
TcpDatagramSocket() Create a new TcpDatagramSocket that with a wildcard address bound to an ephemeral port. |
|
TcpDatagramSocket(int nPort) Creates a new TcpDatagramSocket using the wildcard address and the specified port. |
|
TcpDatagramSocket(int nPort, java.net.InetAddress addr) Creates a new TcpDatagramSocket using an address and a port number. |
|
TcpDatagramSocket(java.net.SocketAddress addr) Creates a new TcpDatagramSocket which will be bound to the specified address . |
|
TcpDatagramSocket(SocketProvider provider) Creates a new TcpDatagramSocket using the provider . |
protected |
TcpDatagramSocket(TcpDatagramSocket.Impl impl) Creates a new TcpDatagramSocket using an TcpDatagramSocket.Impl . |
Method Summary | |
---|---|
void |
bind(java.net.SocketAddress addr) |
boolean |
isBound() |
java.nio.channels.spi.SelectorProvider |
provider() Return the SelectorProvider associated with this socket. |
void |
receive(java.net.DatagramPacket p) |
void |
send(java.net.DatagramPacket p) |
void |
setAdvanceFrequency(int nAdvance) Specify the frequency at which the DatagramSocket will advance over the sub-sockets during receive. |
void |
setListenBacklog(int n) Specify the listen backlog for the server socket. |
void |
setPacketMagic(int nMagic, int nMask) Specify the packet header which is included at the start of every packet. |
void |
setSocketOptions(java.net.SocketOptions options) Specify SocketOptions to be used to configure each of the underlying TCP sockets. |
java.lang.String |
toString() |
Methods inherited from class java.net.DatagramSocket |
---|
close, connect, connect, disconnect, getBroadcast, getChannel, getInetAddress, getLocalAddress, getLocalPort, getLocalSocketAddress, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoTimeout, getTrafficClass, isClosed, isConnected, setBroadcast, setDatagramSocketImplFactory, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSoTimeout, setTrafficClass |
Field Detail |
---|
public static final int IO_EXCEPTIONS_LOG_LEVEL
protected TcpDatagramSocket.Impl m_impl
Constructor Detail |
---|
public TcpDatagramSocket() throws java.net.SocketException
java.net.SocketException
- if any error happens during the bind, or if the port is unavailablepublic TcpDatagramSocket(java.net.SocketAddress addr) throws java.net.SocketException
address
.
addr
- the address
to bindjava.net.SocketException
- if any error happens during the bind, or if the port is unavailablepublic TcpDatagramSocket(int nPort) throws java.net.SocketException
The port number should be between 0 and 65535. Zero means that the system will pick an ephemeral port during the bind operation.
nPort
- the port to bind tojava.net.SocketException
- if any error happens during the bind, or if the port is unavailablepublic TcpDatagramSocket(int nPort, java.net.InetAddress addr) throws java.net.SocketException
address
and a port number.
If null
is specified as the address assigned will be the wildcard address.
The port number should be between 0 and 65535. Zero means that the system will pick an ephemeral port during the bind operation.
nPort
- the port numberaddr
- the IP addressjava.net.SocketException
- if any error happens during the bind, or if the port is unavailablepublic TcpDatagramSocket(SocketProvider provider) throws java.net.SocketException
provider
.
provider
- the provider
to be usedjava.net.SocketException
- if any error happens during the bind, or if the port is unavailableprotected TcpDatagramSocket(TcpDatagramSocket.Impl impl)
TcpDatagramSocket.Impl
.
impl
- a TcpDatagramSocket.Impl
Method Detail |
---|
public java.nio.channels.spi.SelectorProvider provider()
public void setSocketOptions(java.net.SocketOptions options) throws java.net.SocketException
options
- the SocketOptionsjava.net.SocketException
- if the options fail to be setpublic void setListenBacklog(int n) throws java.io.IOException
n
- the depth of the backlog, or <=0 for the OS default.java.io.IOException
- if the port is unavailablepublic void setPacketMagic(int nMagic, int nMask) throws java.io.IOException
nMagic
- the packet headernMask
- the packet header bitmask identifying the bits usedjava.io.IOException
- if the port is unavailablepublic void setAdvanceFrequency(int nAdvance)
nAdvance
- the packet frequency at which to advance between peerspublic void bind(java.net.SocketAddress addr) throws java.net.SocketException
bind
in class java.net.DatagramSocket
java.net.SocketException
public boolean isBound()
isBound
in class java.net.DatagramSocket
public void send(java.net.DatagramPacket p) throws java.io.IOException
send
in class java.net.DatagramSocket
java.io.IOException
public void receive(java.net.DatagramPacket p) throws java.io.IOException
receive
in class java.net.DatagramSocket
java.io.IOException
public java.lang.String toString()
|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |