Package net.i2p.data.i2cp
Class I2CPMessageHandler
- java.lang.Object
-
- net.i2p.data.i2cp.I2CPMessageHandler
-
public class I2CPMessageHandler extends Object
Handle messages from the server for the client or vice versa
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_LENGTH
This is huge.
-
Constructor Summary
Constructors Constructor Description I2CPMessageHandler()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static I2CPMessage
readMessage(InputStream in)
Read an I2CPMessage from the stream and return the fully populated object.
-
-
-
Field Detail
-
MAX_LENGTH
public static final int MAX_LENGTH
This is huge. Mainly to catch a completly bogus response, possibly not an I2CP socket.- Since:
- 0.9.11
- See Also:
- Constant Field Values
-
-
Method Detail
-
readMessage
public static I2CPMessage readMessage(InputStream in) throws IOException, I2CPMessageException
Read an I2CPMessage from the stream and return the fully populated object.- Parameters:
in
- I2CP input stream- Returns:
- Fully populated I2CPMessage
- Throws:
IOException
- if there is an IO problem reading from the streamI2CPMessageException
- if there is a problem handling the particular message - if it is an unknown type or has improper formatting, etc.
-
-