java.lang.Object
java.net.DatagramSocket
org.newsclub.net.unix.AFDatagramSocket<AFTIPCSocketAddress>
org.newsclub.net.unix.tipc.AFTIPCDatagramSocket
- All Implemented Interfaces:
Closeable
,AutoCloseable
,AFSocketExtensions
,AFSomeSocket
,AFSomeSocketThing
,FileDescriptorAccess
,AFTIPCSocketExtensions
public final class AFTIPCDatagramSocket
extends AFDatagramSocket<AFTIPCSocketAddress>
implements AFTIPCSocketExtensions
A
DatagramSocket
implementation that works with AF_TIPC
sockets.- Author:
- Christian Kohlschütter
-
Nested Class Summary
Nested classes/interfaces inherited from class org.newsclub.net.unix.AFDatagramSocket
AFDatagramSocket.Constructor<A extends AFSocketAddress>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The maximum size for user messages. -
Method Summary
Modifier and TypeMethodDescriptionReturns the TIPC "DestName" information from the ancillary receive buffer (if any was set), ornull
if no DestName was retrieved.Returns the TIPC "ErrInfo" information from the ancillary receive buffer (if any was set), ornull
if no error was retrieved.<T> T
getOption
(SocketOption<T> name) protected AFTIPCDatagramChannel
Creates a newDatagramChannel
that is associated with this socket.protected AFDatagramSocket
<AFTIPCSocketAddress> Returns a newAFDatagramSocket
instance to be used forAFDatagramSocket.accept()
, i.e., noFileDescriptor
is associated.static AFTIPCDatagramSocket
Returns a newAFTIPCDatagramSocket
instance, using the defaultAFSocketType.SOCK_DGRAM
socket type.static AFTIPCDatagramSocket
newInstance
(AFSocketType socketType) Returns a newAFTIPCDatagramSocket
instance for the given socket type.<T> DatagramSocket
setOption
(SocketOption<T> name, T value) Methods inherited from class org.newsclub.net.unix.AFDatagramSocket
accept, addressFamily, bind, close, connect, connect, ensureAncillaryReceiveBufferSize, getAncillaryReceiveBufferSize, getFileDescriptor, getImplExtensions, getLocalSocketAddress, getOption, getRemoteSocketAddress, isBound, isClosed, isConnected, isDeleteOnClose, listen, newInstance, newInstance, peek, receive, send, setAncillaryReceiveBufferSize, setDeleteOnClose, setOption, setShutdownOnClose, socketAddressClass
Methods inherited from class java.net.DatagramSocket
disconnect, getBroadcast, getInetAddress, getLocalAddress, getLocalPort, getPort, getReceiveBufferSize, getReuseAddress, getSendBufferSize, getSoTimeout, getTrafficClass, joinGroup, leaveGroup, setBroadcast, setDatagramSocketImplFactory, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSoTimeout, setTrafficClass, supportedOptions
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.newsclub.net.unix.AFSocketExtensions
ensureAncillaryReceiveBufferSize, getAncillaryReceiveBufferSize, setAncillaryReceiveBufferSize
-
Field Details
-
TIPC_MAX_USER_MSG_SIZE
public static final int TIPC_MAX_USER_MSG_SIZEThe maximum size for user messages.- See Also:
-
-
Method Details
-
newChannel
Description copied from class:AFDatagramSocket
Creates a newDatagramChannel
that is associated with this socket.- Specified by:
newChannel
in classAFDatagramSocket<AFTIPCSocketAddress>
- Returns:
- The channel.
-
newInstance
Returns a newAFTIPCDatagramSocket
instance, using the defaultAFSocketType.SOCK_DGRAM
socket type.- Returns:
- The new instance.
- Throws:
IOException
- on error.
-
newInstance
Returns a newAFTIPCDatagramSocket
instance for the given socket type.- Parameters:
socketType
- The socket type.- Returns:
- The new instance.
- Throws:
IOException
- on error.
-
getChannel
- Overrides:
getChannel
in classAFDatagramSocket<AFTIPCSocketAddress>
-
getErrInfo
Description copied from interface:AFTIPCSocketExtensions
Returns the TIPC "ErrInfo" information from the ancillary receive buffer (if any was set), ornull
if no error was retrieved.- Specified by:
getErrInfo
in interfaceAFTIPCSocketExtensions
- Returns:
- The ErrInfo.
-
getDestName
Description copied from interface:AFTIPCSocketExtensions
Returns the TIPC "DestName" information from the ancillary receive buffer (if any was set), ornull
if no DestName was retrieved.- Specified by:
getDestName
in interfaceAFTIPCSocketExtensions
- Returns:
- The service address or range (without scope) that was specified by the sender of the message.
-
newDatagramSocketInstance
Description copied from class:AFDatagramSocket
Returns a newAFDatagramSocket
instance to be used forAFDatagramSocket.accept()
, i.e., noFileDescriptor
is associated.- Specified by:
newDatagramSocketInstance
in classAFDatagramSocket<AFTIPCSocketAddress>
- Returns:
- The new instance.
- Throws:
IOException
- on error.
-
getOption
- Overrides:
getOption
in classDatagramSocket
- Throws:
IOException
-
setOption
- Overrides:
setOption
in classDatagramSocket
- Throws:
IOException
-