public class ServerSocketStreamSource extends SocketStreamSource
StreamSource that gets streams from ServerSockets. This
allows you to communicate over sockets that are established by the remote
party (ie as a TCP/IP server).| Modifier and Type | Field and Description |
|---|---|
static int |
TIMEOUT
The default SO_TIMEOUT value for sockets returned by this class
|
| Constructor and Description |
|---|
ServerSocketStreamSource(ServerSocket theServerSocket,
String theExpectedAddress) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Accepts new connections on underlying ServerSocket, replacing
any existing socket with the new one, blocking until a connection
is available.
|
Socket |
getSocket() |
disconnect, getInboundStream, getOutboundStreampublic static final int TIMEOUT
public ServerSocketStreamSource(ServerSocket theServerSocket, String theExpectedAddress) throws TransportException
theServerSocket - a ServerSocket at which to listen for incoming connectionstheExpectedAddress - the IP address from which to accept connections (null means
accept from any address)TransportExceptionpublic Socket getSocket()
getSocket in class SocketStreamSourceSocketStreamSource.getSocket()public void connect() throws TransportException
DualTransportConnector for a method of
connecting two TransportLayers in a way that avoids deadlock.connect in interface StreamSourceconnect in class SocketStreamSourceTransportExceptionStreamSource.connect()Copyright © 2001–2017 University Health Network. All rights reserved.