Package net.i2p.router.transport.ntcp
Class NTCP2Options
- java.lang.Object
-
- net.i2p.router.transport.ntcp.NTCP2Options
-
class NTCP2Options extends Object
NTCP2 Padding/Dummy/Delay configuration for data phase. Any other options TBD.- Since:
- 0.9.36
-
-
Constructor Summary
Constructors Constructor Description NTCP2Options(float sendMin, float sendMax, float recvMin, float recvMax, int sendDummy, int recvDummy, int sendDelay, int recvDelay)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NTCP2Options
fromByteArray(byte[] options)
int
getRecvDelay()
int
getRecvDummy()
float
getRecvMax()
float
getRecvMin()
int
getSendDelay()
int
getSendDummy()
float
getSendMax()
float
getSendMin()
NTCP2Options
merge(NTCP2Options his)
Get a combined config for this connection.String
toString()
-
-
-
Method Detail
-
getSendMin
public float getSendMin()
-
getSendMax
public float getSendMax()
-
getRecvMin
public float getRecvMin()
-
getRecvMax
public float getRecvMax()
-
getSendDummy
public int getSendDummy()
-
getRecvDummy
public int getRecvDummy()
-
getSendDelay
public int getSendDelay()
-
getRecvDelay
public int getRecvDelay()
-
merge
public NTCP2Options merge(NTCP2Options his)
Get a combined config for this connection. If incompatible, prefer ours.- Parameters:
his
- far end options (send is his send, recv is his recv)- Returns:
- merged options from our perspective (send is our send, recv is our recv)
-
fromByteArray
public static NTCP2Options fromByteArray(byte[] options)
- Returns:
- null on error
- Since:
- 0.9.37 consolidated from two places
-
-