java.lang.Object
java.net.DatagramSocket
org.newsclub.net.unix.AFDatagramSocket<org.newsclub.net.unix.AFVSOCKSocketAddress>
org.newsclub.net.unix.vsock.AFVSOCKDatagramSocket
- All Implemented Interfaces:
Closeable,AutoCloseable,org.newsclub.net.unix.AFSocketExtensions,org.newsclub.net.unix.AFSomeSocket,org.newsclub.net.unix.FileDescriptorAccess,AFVSOCKSocketExtensions
public final class AFVSOCKDatagramSocket
extends org.newsclub.net.unix.AFDatagramSocket<org.newsclub.net.unix.AFVSOCKSocketAddress>
implements AFVSOCKSocketExtensions
A
DatagramSocket implementation that works with AF_VSOCK sockets.- Author:
- Christian Kohlschütter
-
Nested Class Summary
Nested classes/interfaces inherited from class org.newsclub.net.unix.AFDatagramSocket
org.newsclub.net.unix.AFDatagramSocket.Constructor<A extends org.newsclub.net.unix.AFSocketAddress> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe maximum size for user messages. -
Method Summary
Modifier and TypeMethodDescriptionprotected AFVSOCKDatagramChannelstatic AFVSOCKDatagramSocketReturns a newAFVSOCKDatagramSocketinstance, using the defaultAFSocketType.SOCK_DGRAMsocket type.static AFVSOCKDatagramSocketnewInstance(org.newsclub.net.unix.AFSocketType socketType) Returns a newAFVSOCKDatagramSocketinstance for the given socket type.Methods inherited from class org.newsclub.net.unix.AFDatagramSocket
addressFamily, bind, close, connect, connect, ensureAncillaryReceiveBufferSize, getAncillaryDataSupport, getAncillaryReceiveBufferSize, getFileDescriptor, getImplExtensions, getLocalSocketAddress, getRemoteSocketAddress, isBound, isClosed, isConnected, isDeleteOnClose, newInstance, newInstance, peek, receive, send, setAncillaryReceiveBufferSize, setDeleteOnClose, socketAddressClassMethods inherited from class java.net.DatagramSocket
disconnect, getBroadcast, getInetAddress, getLocalAddress, getLocalPort, getOption, getPort, getReceiveBufferSize, getReuseAddress, getSendBufferSize, getSoTimeout, getTrafficClass, joinGroup, leaveGroup, setBroadcast, setDatagramSocketImplFactory, setOption, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSoTimeout, setTrafficClass, supportedOptionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.newsclub.net.unix.AFSocketExtensions
ensureAncillaryReceiveBufferSize, getAncillaryReceiveBufferSize, setAncillaryReceiveBufferSize
-
Field Details
-
VSOCK_MAX_USER_MSG_SIZE
public static final int VSOCK_MAX_USER_MSG_SIZEThe maximum size for user messages.- See Also:
-
-
Method Details
-
newChannel
- Specified by:
newChannelin classorg.newsclub.net.unix.AFDatagramSocket<org.newsclub.net.unix.AFVSOCKSocketAddress>
-
newInstance
Returns a newAFVSOCKDatagramSocketinstance, using the defaultAFSocketType.SOCK_DGRAMsocket type.- Returns:
- The new instance.
- Throws:
IOException- on error.
-
newInstance
public static AFVSOCKDatagramSocket newInstance(org.newsclub.net.unix.AFSocketType socketType) throws IOException Returns a newAFVSOCKDatagramSocketinstance for the given socket type.- Parameters:
socketType- The socket type.- Returns:
- The new instance.
- Throws:
IOException- on error.
-
getChannel
- Overrides:
getChannelin classorg.newsclub.net.unix.AFDatagramSocket<org.newsclub.net.unix.AFVSOCKSocketAddress>
-