Module org.newsclub.net.unix.vsock
Package org.newsclub.net.unix.vsock
Class AFVSOCKSocketPair<T extends org.newsclub.net.unix.AFSomeSocket>
java.lang.Object
org.newsclub.net.unix.CloseablePair<T>
org.newsclub.net.unix.AFSocketPair<T>
org.newsclub.net.unix.vsock.AFVSOCKSocketPair<T>
- Type Parameters:
T- The socket type.
- All Implemented Interfaces:
Closeable,AutoCloseable
public final class AFVSOCKSocketPair<T extends org.newsclub.net.unix.AFSomeSocket>
extends org.newsclub.net.unix.AFSocketPair<T>
A pair of sockets.
- Author:
- Christian Kohlschütter
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAFVSOCKSocketPair(T socket1, T socket2) Creates a new socket pair. -
Method Summary
Modifier and TypeMethodDescriptionopen()Opens a socket pair of interconnected channels.Opens a socket pair of interconnected datagram channels.Methods inherited from class org.newsclub.net.unix.AFSocketPair
getSocket1, getSocket2Methods inherited from class org.newsclub.net.unix.CloseablePair
close, getFirst, getSecond
-
Constructor Details
-
AFVSOCKSocketPair
Creates a new socket pair.- Parameters:
socket1- The first socket.socket2- The second socket.
-
-
Method Details
-
open
Opens a socket pair of interconnected channels.- Returns:
- The new channel pair.
- Throws:
IOException- on error.
-
openDatagram
Opens a socket pair of interconnected datagram channels.- Returns:
- The new channel pair.
- Throws:
IOException- on error.
-