asynctcp
Class ASyncTCPParams

java.lang.Object
  extended by asynctcp.ASyncTCPParams

public class ASyncTCPParams
extends java.lang.Object

A class containing all parameters used by an ASyncTCP instance.

Author:
Michael Parker

Field Summary
static int DEFAULT_RECV_BUFFER_SIZE
           
static int DEFAULT_SEND_BUFFER_SIZE
           
 
Method Summary
 boolean copyParams(ASyncTCPParams atcpp)
          Sets all parameter values to those contained in atcpp.
 ASyncTCP getASyncTCP()
          Returns the ASyncTCP instance that these parameters configure.
 int getRecvBufferSize()
          Returns the size, in bytes, of the application-level receive buffer of an incoming connection.
 int getSendBufferSize()
          Returns the size, in bytes, of the application-level send buffer of an outgoing connection.
 boolean setRecvBufferSize(int _size)
          Sets the size, in bytes, of the application-level receive buffer of an incoming connection.
 boolean setSendBufferSize(int _size)
          Sets the size, in bytes, of the application-level send buffer of an outgoing connection.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SEND_BUFFER_SIZE

public static final int DEFAULT_SEND_BUFFER_SIZE
See Also:
Constant Field Values

DEFAULT_RECV_BUFFER_SIZE

public static final int DEFAULT_RECV_BUFFER_SIZE
See Also:
Constant Field Values
Method Detail

getASyncTCP

public ASyncTCP getASyncTCP()
Returns the ASyncTCP instance that these parameters configure.

Returns:
the corresponding ASyncTCP instance

copyParams

public boolean copyParams(ASyncTCPParams atcpp)
Sets all parameter values to those contained in atcpp. Note that this method may fail if the associated PonyRide instance is already in use.

Parameters:
atcpp - the ASyncTCPParams object whose parmaeters should be used
Returns:
true if the parameters are copied successfully, false otherwise

getSendBufferSize

public int getSendBufferSize()
Returns the size, in bytes, of the application-level send buffer of an outgoing connection.

Returns:
the send buffer size, in bytes

setSendBufferSize

public boolean setSendBufferSize(int _size)
Sets the size, in bytes, of the application-level send buffer of an outgoing connection. Note that this method may fail if the associated ASyncTCP instance is already in use.

Parameters:
_size - the send buffer size, in bytes
Returns:
true if the new send buffer size is set successfully, false otherwise

getRecvBufferSize

public int getRecvBufferSize()
Returns the size, in bytes, of the application-level receive buffer of an incoming connection.

Returns:
the receive buffer size, in bytes

setRecvBufferSize

public boolean setRecvBufferSize(int _size)
Sets the size, in bytes, of the application-level receive buffer of an incoming connection. Note that this method may fail if the associated ASyncTCP instance is already in use.

Parameters:
_size - the receive buffer size, in bytes
Returns:
true if the new receive buffer size is set successfully, false otherwise