Package com.google.caliper.bridge
Class OpenedSocket
- java.lang.Object
-
- com.google.caliper.bridge.OpenedSocket
-
public final class OpenedSocket extends Object
A simple tuple for the opened streams of a socket.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOpenedSocket.ReaderReads objects from the socket.static classOpenedSocket.WriterWrites objects to the socket.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OpenedSocketfromSocket(Socket socket)Returns a newOpenedSocketfor the given connectedSocketinstance.static OpenedSocketfromSocket(SocketChannel socket)Waits for the channel to connect and returns a newOpenedSocket.OpenedSocket.Readerreader()OpenedSocket.Writerwriter()
-
-
-
Method Detail
-
fromSocket
public static OpenedSocket fromSocket(SocketChannel socket) throws IOException
Waits for the channel to connect and returns a newOpenedSocket.- Throws:
IOException
-
fromSocket
public static OpenedSocket fromSocket(Socket socket) throws IOException
Returns a newOpenedSocketfor the given connectedSocketinstance.- Throws:
IOException
-
reader
public OpenedSocket.Reader reader()
-
writer
public OpenedSocket.Writer writer()
-
-