Module org.newsclub.net.unix
Package org.newsclub.net.unix
Class AFUNIXSocketPair<T extends AFSomeSocket>
java.lang.Object
org.newsclub.net.unix.CloseablePair<T>
org.newsclub.net.unix.AFSocketPair<T>
org.newsclub.net.unix.AFUNIXSocketPair<T>
- Type Parameters:
T
- The socket type.
- All Implemented Interfaces:
Closeable
,AutoCloseable
A pair of sockets.
- Author:
- Christian Kohlschütter
-
Method Summary
Modifier and TypeMethodDescriptionstatic AFUNIXSocketPair
<AFUNIXSocketChannel> open()
Opens a socket pair of interconnected channels.Opens a socket pair of interconnected datagram channels.openDatagram
(AFSocketType type) Opens a socket pair of interconnectedDatagramChannel
s, using the given socket type.Methods inherited from class org.newsclub.net.unix.AFSocketPair
getSocket1, getSocket2
Methods inherited from class org.newsclub.net.unix.CloseablePair
close, getFirst, getSecond
-
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.
-
openDatagram
public static AFUNIXSocketPair<AFUNIXDatagramChannel> openDatagram(AFSocketType type) throws IOException Opens a socket pair of interconnectedDatagramChannel
s, using the given socket type.- Parameters:
type
- The socket type.- Returns:
- The new channel pair.
- Throws:
IOException
- on error.
-