|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.client.streaming.I2PSocketOptionsImpl
net.i2p.client.streaming.ConnectionOptions
Define the current options for the con (and allow custom tweaking midstream)
Field Summary | |
static int |
DEFAULT_BUFFER_SIZE
|
static int |
DEFAULT_CONNECT_TIMEOUT
|
(package private) static int |
DEFAULT_MAX_SENDS
|
static int |
DEFAULT_WRITE_TIMEOUT
|
static int |
INACTIVITY_ACTION_DISCONNECT
on inactivity timeout, close the connection |
static int |
INACTIVITY_ACTION_NOOP
on inactivity timeout, do nothing |
static int |
INACTIVITY_ACTION_SEND
on inactivity timeout, send a payload message |
(package private) static int |
INITIAL_WINDOW_SIZE
|
(package private) static int |
MIN_WINDOW_SIZE
|
static int |
PROFILE_BULK
|
static int |
PROFILE_INTERACTIVE
|
static java.lang.String |
PROP_CONGESTION_AVOIDANCE_GROWTH_RATE_FACTOR
|
static java.lang.String |
PROP_CONNECT_DELAY
|
static java.lang.String |
PROP_INACTIVITY_ACTION
|
static java.lang.String |
PROP_INACTIVITY_TIMEOUT
|
static java.lang.String |
PROP_INITIAL_ACK_DELAY
|
static java.lang.String |
PROP_INITIAL_RECEIVE_WINDOW
|
static java.lang.String |
PROP_INITIAL_RESEND_DELAY
|
static java.lang.String |
PROP_INITIAL_RTT
|
static java.lang.String |
PROP_INITIAL_WINDOW_SIZE
|
static java.lang.String |
PROP_MAX_MESSAGE_SIZE
|
static java.lang.String |
PROP_MAX_RESENDS
|
static java.lang.String |
PROP_MAX_WINDOW_SIZE
|
static java.lang.String |
PROP_PROFILE
|
static java.lang.String |
PROP_SLOW_START_GROWTH_RATE_FACTOR
|
Fields inherited from interface net.i2p.client.streaming.I2PSocketOptions |
PROP_BUFFER_SIZE, PROP_CONNECT_TIMEOUT, PROP_READ_TIMEOUT, PROP_WRITE_TIMEOUT |
Constructor Summary | |
ConnectionOptions()
|
|
ConnectionOptions(ConnectionOptions opts)
|
|
ConnectionOptions(I2PSocketOptions opts)
|
|
ConnectionOptions(java.util.Properties opts)
|
Method Summary | |
int |
getChoke()
how long we want to wait before any data is transferred on the connection in either direction |
int |
getCongestionAvoidanceGrowthRateFactor()
When we're in congestion avoidance, we grow the window size at the rate of 1/(windowSize*factor). |
int |
getConnectDelay()
how long will we wait after instantiating a new con before actually attempting to connect. |
long |
getConnectTimeout()
How long we will wait for the ACK from a SYN, in milliseconds. |
int |
getInactivityAction()
|
int |
getInactivityTimeout()
What period of inactivity qualifies as "too long"? |
int |
getInboundBufferSize()
how much data are we willing to accept in our buffer? |
protected int |
getInt(java.util.Properties opts,
java.lang.String name,
int defaultVal)
|
int |
getMaxBufferSize()
How much data will we accept that hasn't been written out yet. |
int |
getMaxMessageSize()
What is the largest message we want to send or receive? |
int |
getMaxResends()
How many times will we try to send a message before giving up? |
int |
getMaxWindowSize()
|
int |
getProfile()
What profile do we want to use for this connection? |
long |
getReadTimeout()
What is the longest we'll block on the input stream while waiting for more data. |
int |
getReceiveWindow()
after how many consecutive messages should we ack? |
boolean |
getRequireFullySigned()
Do we want all packets in both directions to be signed, or can we deal with signatures on the SYN and FIN packets only? |
int |
getResendDelay()
How long after sending a packet will we wait before resending? |
int |
getRTO()
|
int |
getRTT()
What to set the round trip time estimate to (in milliseconds) |
int |
getRTTTrend()
If we have 3 consecutive rtt increases, we are trending upwards (1), or if we have 3 consecutive rtt decreases, we are trending downwards (-1), else we're stable. |
int |
getSendAckDelay()
if there are packets we haven't ACKed yet and we don't receive _receiveWindow messages before (_lastSendTime+_sendAckDelay), send an ACK of what we have received so far. |
int |
getSlowStartGrowthRateFactor()
When we're in slow start, we grow the window size at the rate of 1/(factor). |
int |
getWindowSize()
How many messages will we send before waiting for an ACK? |
long |
getWriteTimeout()
What is the longest we'll block on the output stream while waiting for the data to flush. |
protected void |
init(java.util.Properties opts)
|
static void |
main(java.lang.String[] args)
|
void |
setChoke(int ms)
|
void |
setCongestionAvoidanceGrowthRateFactor(int factor)
|
void |
setConnectDelay(int delayMs)
|
void |
setConnectTimeout(long ms)
Define how long we will wait for the ACK from a SYN, in milliseconds. |
void |
setInactivityAction(int action)
|
void |
setInactivityTimeout(int timeout)
|
void |
setInboundBufferSize(int bytes)
|
void |
setMaxBufferSize(int numBytes)
How much data will we accept that hasn't been written out yet. |
void |
setMaxMessageSize(int bytes)
|
void |
setMaxResends(int numSends)
|
void |
setMaxWindowSize(int msgs)
|
void |
setProfile(int profile)
|
void |
setProperties(java.util.Properties opts)
|
void |
setReadTimeout(long ms)
What is the longest we'll block on the input stream while waiting for more data. |
void |
setReceiveWindow(int numMsgs)
|
void |
setRequireFullySigned(boolean sign)
|
void |
setResendDelay(int ms)
|
void |
setRTT(int ms)
|
void |
setSendAckDelay(int delayMs)
|
void |
setSlowStartGrowthRateFactor(int factor)
|
void |
setWindowSize(int numMsgs)
|
void |
setWriteTimeout(long ms)
What is the longest we'll block on the output stream while waiting for the data to flush. |
java.lang.String |
toString()
|
void |
updateRTT(int measuredValue)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int PROFILE_BULK
public static final int PROFILE_INTERACTIVE
public static final int INACTIVITY_ACTION_NOOP
public static final int INACTIVITY_ACTION_DISCONNECT
public static final int INACTIVITY_ACTION_SEND
public static final java.lang.String PROP_CONNECT_DELAY
public static final java.lang.String PROP_PROFILE
public static final java.lang.String PROP_MAX_MESSAGE_SIZE
public static final java.lang.String PROP_MAX_RESENDS
public static final java.lang.String PROP_INITIAL_RTT
public static final java.lang.String PROP_INITIAL_RESEND_DELAY
public static final java.lang.String PROP_INITIAL_ACK_DELAY
public static final java.lang.String PROP_INITIAL_WINDOW_SIZE
public static final java.lang.String PROP_INITIAL_RECEIVE_WINDOW
public static final java.lang.String PROP_INACTIVITY_TIMEOUT
public static final java.lang.String PROP_INACTIVITY_ACTION
public static final java.lang.String PROP_MAX_WINDOW_SIZE
public static final java.lang.String PROP_CONGESTION_AVOIDANCE_GROWTH_RATE_FACTOR
public static final java.lang.String PROP_SLOW_START_GROWTH_RATE_FACTOR
static final int INITIAL_WINDOW_SIZE
static final int DEFAULT_MAX_SENDS
static final int MIN_WINDOW_SIZE
public static final int DEFAULT_BUFFER_SIZE
public static final int DEFAULT_WRITE_TIMEOUT
public static final int DEFAULT_CONNECT_TIMEOUT
Constructor Detail |
public ConnectionOptions()
public ConnectionOptions(java.util.Properties opts)
public ConnectionOptions(I2PSocketOptions opts)
public ConnectionOptions(ConnectionOptions opts)
Method Detail |
protected void init(java.util.Properties opts)
init
in class I2PSocketOptionsImpl
public void setProperties(java.util.Properties opts)
setProperties
in class I2PSocketOptionsImpl
public int getConnectDelay()
public void setConnectDelay(int delayMs)
public boolean getRequireFullySigned()
public void setRequireFullySigned(boolean sign)
public int getWindowSize()
public void setWindowSize(int numMsgs)
public int getReceiveWindow()
public void setReceiveWindow(int numMsgs)
public int getRTT()
public void setRTT(int ms)
public int getRTO()
public int getRTTTrend()
public void updateRTT(int measuredValue)
public int getResendDelay()
public void setResendDelay(int ms)
public int getSendAckDelay()
public void setSendAckDelay(int delayMs)
public int getMaxMessageSize()
public void setMaxMessageSize(int bytes)
public int getChoke()
public void setChoke(int ms)
public int getProfile()
public void setProfile(int profile)
public int getMaxResends()
public void setMaxResends(int numSends)
public int getInactivityTimeout()
public void setInactivityTimeout(int timeout)
public int getInactivityAction()
public void setInactivityAction(int action)
public int getMaxWindowSize()
public void setMaxWindowSize(int msgs)
public int getInboundBufferSize()
public void setInboundBufferSize(int bytes)
public int getCongestionAvoidanceGrowthRateFactor()
public void setCongestionAvoidanceGrowthRateFactor(int factor)
public int getSlowStartGrowthRateFactor()
public void setSlowStartGrowthRateFactor(int factor)
public java.lang.String toString()
public static void main(java.lang.String[] args)
protected int getInt(java.util.Properties opts, java.lang.String name, int defaultVal)
public long getConnectTimeout()
getConnectTimeout
in interface I2PSocketOptions
public void setConnectTimeout(long ms)
setConnectTimeout
in interface I2PSocketOptions
public long getReadTimeout()
getReadTimeout
in interface I2PSocketOptions
public void setReadTimeout(long ms)
setReadTimeout
in interface I2PSocketOptions
public int getMaxBufferSize()
getMaxBufferSize
in interface I2PSocketOptions
public void setMaxBufferSize(int numBytes)
setMaxBufferSize
in interface I2PSocketOptions
public long getWriteTimeout()
getWriteTimeout
in interface I2PSocketOptions
public void setWriteTimeout(long ms)
setWriteTimeout
in interface I2PSocketOptions
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |