Package net.i2p.data.i2cp
Class I2CPMessageHandler
java.lang.Object
net.i2p.data.i2cp.I2CPMessageHandler
Handle messages from the server for the client or vice versa
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic I2CPMessage
Read an I2CPMessage from the stream and return the fully populated object.
-
Field Details
-
MAX_LENGTH
public static final int MAX_LENGTHThis is huge. Mainly to catch a completly bogus response, possibly not an I2CP socket.- Since:
- 0.9.11
- See Also:
-
-
Constructor Details
-
I2CPMessageHandler
public I2CPMessageHandler()
-
-
Method Details
-
readMessage
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.
-