public class PSocket extends PBaseSocket
id_, numStreams_, sockets_| Constructor and Description |
|---|
PSocket(byte[] key,
boolean compress)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSocketStream(Socket sock)
Add a socket to this parallel stream
|
boolean |
clientConnectionDone()
Check whether client finished connection.
|
void |
close()
Close socket.
|
int |
getId()
return id number of this parallel stream socket
|
void |
init(int id,
int numstreams)
Set up this socket.
|
getInetAddress, getInputStream, getKeepAlive, getLocalAddress, getLocalPort, getNumStreams, getOutputStream, getPort, getReceiveBufferSize, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, setKeepAlive, setReceiveBufferSize, setSendBufferSize, setSoLinger, setSoTimeout, setTcpNoDelay, shutdownInput, shutdownOutputbind, connect, connect, getChannel, getLocalSocketAddress, getOOBInline, getRemoteSocketAddress, getReuseAddress, getTrafficClass, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setOOBInline, setPerformancePreferences, setReuseAddress, setSocketImplFactory, setTrafficClass, toStringpublic PSocket(byte[] key,
boolean compress)
key - - encoded key for encryption/decryption. Set no null for no encryptionpublic void init(int id,
int numstreams)
throws IOException
IOExceptionpublic int getId()
public void addSocketStream(Socket sock)
public boolean clientConnectionDone()
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class SocketIOExceptionCopyright © 2010–2016 UNICORE. All rights reserved.