|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.asyncobjects.AsyncUnicastServer<ASocket> net.sf.asyncobjects.net.threading.TSocket
public class TSocket
implementation of socket with threads. jdk 1.3 required.
Nested Class Summary | |
---|---|
class |
TSocket.TInputStreamAdapter
Adapter for socket's input stream. |
class |
TSocket.TOutputStreamAdapter
Adapter for socket output stream. |
Constructor Summary | |
---|---|
TSocket(VatRunner runner)
A constructor |
|
TSocket(VatRunner runner,
Socket socket)
A socket |
Method Summary | |
---|---|
Promise<Void> |
close()
Close resource |
Promise<Void> |
connect(String host,
int port)
Connect to specific host and port |
Promise<AByteInput> |
getInput()
|
Promise<AByteOutput> |
getOutput()
|
Promise<Boolean> |
getTcpNoDelay()
Get TCP_NODELAY |
Promise<Void> |
setTcpNoDelay(boolean optionValue)
Set TCP_NODELAY option |
Methods inherited from class net.sf.asyncobjects.AsyncUnicastServer |
---|
dereference, export, isImmediate, myVat, promise |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.asyncobjects.AsyncObject |
---|
dereference, isImmediate |
Constructor Detail |
---|
public TSocket(VatRunner runner)
runner
- runner used to create streamspublic TSocket(VatRunner runner, Socket socket)
runner
- vat group used to create streamssocket
- existing socketMethod Detail |
---|
public Promise<Void> connect(String host, int port)
connect
in interface ASocket
host
- a hostport
- a port
ASocket.connect(String, int)
public Promise<AByteInput> getInput()
getInput
in interface AChannel<BinaryData,AByteInput,AByteOutput>
AChannel.getInput()
public Promise<Void> setTcpNoDelay(boolean optionValue)
ASocket
setTcpNoDelay
in interface ASocket
optionValue
- option value
ASocket.setTcpNoDelay(boolean)
public Promise<Boolean> getTcpNoDelay()
getTcpNoDelay
in interface ASocket
Socket.getTcpNoDelay()
public Promise<AByteOutput> getOutput()
getOutput
in interface AChannel<BinaryData,AByteInput,AByteOutput>
AChannel.getOutput()
public Promise<Void> close()
ACloseable
close
in interface ACloseable
ACloseable.close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |