I2PSessionListener
, I2PSessionMuxedListener
public class I2PSessionDemultiplexer extends java.lang.Object implements I2PSessionMuxedListener
コンストラクタ | 説明 |
---|---|
I2PSessionDemultiplexer(I2PAppContext ctx) |
修飾子とタイプ | メソッド | 説明 |
---|---|---|
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,
java.lang.String message,
java.lang.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
インタフェース内 I2PSessionListener
messageAvailable
インタフェース内 I2PSessionMuxedListener
session
- 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)
I2PSessionMuxedListener
messageAvailable
インタフェース内 I2PSessionMuxedListener
session
- 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)
I2PSessionMuxedListener
reportAbuse
インタフェース内 I2PSessionListener
reportAbuse
インタフェース内 I2PSessionMuxedListener
session
- session to report abuse toseverity
- how bad the abuse ispublic void disconnected(I2PSession session)
I2PSessionMuxedListener
disconnected
インタフェース内 I2PSessionListener
disconnected
インタフェース内 I2PSessionMuxedListener
public void errorOccurred(I2PSession session, java.lang.String message, java.lang.Throwable error)
I2PSessionMuxedListener
errorOccurred
インタフェース内 I2PSessionListener
errorOccurred
インタフェース内 I2PSessionMuxedListener
error
- 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)