net.sf.asyncobjects.net
Interface ASocket

All Superinterfaces:
AByteChannel, AChannel<BinaryData,AByteInput,AByteOutput>, ACloseable, AsyncObject
All Known Implementing Classes:
NIOSocket, TSocket

public interface ASocket
extends AByteChannel

A socket wrapper interface


Method Summary
 Promise<Void> connect(String host, int port)
          Connect socket to specified port and host
 Promise<Boolean> getTcpNoDelay()
          Get value of TCP_NODELAY option
 Promise<Void> setTcpNoDelay(boolean optionValue)
          Set TCP_NODELAY option
 
Methods inherited from interface net.sf.asyncobjects.io.AChannel
getInput, getOutput
 
Methods inherited from interface net.sf.asyncobjects.ACloseable
close
 
Methods inherited from interface net.sf.asyncobjects.AsyncObject
dereference, isImmediate
 

Method Detail

connect

Promise<Void> connect(String host,
                      int port)
Connect socket to specified port and host

Parameters:
host - a host
port - a port
Returns:
a promise that resolves when connect operation finishes

setTcpNoDelay

Promise<Void> setTcpNoDelay(boolean optionValue)
Set TCP_NODELAY option

Parameters:
optionValue - option value
Returns:
when option is set
See Also:
Socket.setTcpNoDelay(boolean)

getTcpNoDelay

Promise<Boolean> getTcpNoDelay()
Get value of TCP_NODELAY option

Returns:
promise of option value
See Also:
Socket.getTcpNoDelay()


Copyright 2002-2007 Constantine Plotnikov. All Rights Reserved.