com.badlogic.gdx.net
Class ServerSocketHints

java.lang.Object
  extended by com.badlogic.gdx.net.ServerSocketHints

public class ServerSocketHints
extends Object

Options for ServerSocket instances.

Author:
mzechner, noblemaster

Field Summary
 int acceptTimeout
          The SO_TIMEOUT in milliseconds for how long to wait during server.accept().
 int backlog
          The listen backlog length.
 int performancePrefBandwidth
          See performancePrefConnectionTime for details.
 int performancePrefConnectionTime
          Performance preferences are described by three integers whose values indicate the relative importance of short connection time, low latency, and high bandwidth.
 int performancePrefLatency
          See performancePrefConnectionTime for details.
 int receiveBufferSize
          The SO_RCVBUF (receive buffer) size in bytes for server.accept().
 boolean reuseAddress
          Enable/disable the SO_REUSEADDR socket option.
 
Constructor Summary
ServerSocketHints()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

backlog

public int backlog
The listen backlog length. Needs to be greater than 0, otherwise the system default is used. backlog is the maximum queue length for incoming connection, i.e. maximum number of connections waiting for accept(...). If a connection indication arrives when the queue is full, the connection is refused.


performancePrefConnectionTime

public int performancePrefConnectionTime
Performance preferences are described by three integers whose values indicate the relative importance of short connection time, low latency, and high bandwidth. The absolute values of the integers are irrelevant; in order to choose a protocol the values are simply compared, with larger values indicating stronger preferences. Negative values represent a lower priority than positive values. If the application prefers short connection time over both low latency and high bandwidth, for example, then it could invoke this method with the values (1, 0, 0). If the application prefers high bandwidth above low latency, and low latency above short connection time, then it could invoke this method with the values (0, 1, 2).


performancePrefLatency

public int performancePrefLatency
See performancePrefConnectionTime for details.


performancePrefBandwidth

public int performancePrefBandwidth
See performancePrefConnectionTime for details.


reuseAddress

public boolean reuseAddress
Enable/disable the SO_REUSEADDR socket option.


acceptTimeout

public int acceptTimeout
The SO_TIMEOUT in milliseconds for how long to wait during server.accept(). Enter 0 for infinite wait.


receiveBufferSize

public int receiveBufferSize
The SO_RCVBUF (receive buffer) size in bytes for server.accept().

Constructor Detail

ServerSocketHints

public ServerSocketHints()


Copyright © 2013. All Rights Reserved.