I2PSessionListener, I2PSessionMuxedListenerpublic class I2PSessionDemultiplexer extends Object implements I2PSessionMuxedListener
| Constructor | Description |
|---|---|
I2PSessionDemultiplexer(I2PAppContext ctx) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addListener(I2PSessionListener l,
int proto,
int port) |
For those that don't need to hear about the protocol and ports
in messageAvailable()
(Streaming lib)
|
void |
addMuxedListener(I2PSessionMuxedListener l,
int proto,
int port) |
For those that do care
UDP perhaps
|
void |
disconnected(I2PSession session) |
Notify the client that the session has been terminated.
|
void |
errorOccurred(I2PSession session,
String message,
Throwable error) |
Notify the client that some error occurred.
|
void |
messageAvailable(I2PSession session,
int msgId,
long size) |
unused
|
void |
messageAvailable(I2PSession session,
int msgId,
long size,
int proto,
int fromport,
int toport) |
Instruct the client that the given session has received a message
Will be called only if you register via addMuxedSessionListener().
|
void |
removeListener(int proto,
int port) |
|
void |
reportAbuse(I2PSession session,
int severity) |
Instruct the client that the session specified seems to be under attack
and that the client may wish to move its destination to another router.
|
public I2PSessionDemultiplexer(I2PAppContext ctx)
public void messageAvailable(I2PSession session, int msgId, long size)
messageAvailable in interface I2PSessionListenermessageAvailable in interface I2PSessionMuxedListenersession - session to notifymsgId - message number availablesize - size of the message - why it's a long and not an int is a mysterypublic void messageAvailable(I2PSession session, int msgId, long size, int proto, int fromport, int toport)
I2PSessionMuxedListenermessageAvailable in interface I2PSessionMuxedListenersession - session to notifymsgId - message number availablesize - size of the message - why it's a long and not an int is a mysteryproto - 1-254 or 0 for unspecifiedfromport - 1-65535 or 0 for unspecifiedtoport - 1-65535 or 0 for unspecifiedpublic void reportAbuse(I2PSession session, int severity)
I2PSessionMuxedListenerreportAbuse in interface I2PSessionListenerreportAbuse in interface I2PSessionMuxedListenersession - session to report abuse toseverity - how bad the abuse ispublic void disconnected(I2PSession session)
I2PSessionMuxedListenerdisconnected in interface I2PSessionListenerdisconnected in interface I2PSessionMuxedListenerpublic void errorOccurred(I2PSession session, String message, Throwable error)
I2PSessionMuxedListenererrorOccurred in interface I2PSessionListenererrorOccurred in interface I2PSessionMuxedListenererror - can be null? or not?public void addListener(I2PSessionListener l, int proto, int port)
public void addMuxedListener(I2PSessionMuxedListener l, int proto, int port)
public void removeListener(int proto,
int port)