class SAMv3DatagramSession extends SAMDatagramSession implements Session, SAMDatagramReceiver
DGRAM_SIZE_MAX, recv_isOwnSession, _log| Constructor and Description |
|---|
SAMv3DatagramSession(String nick,
Properties props,
SAMv3Handler handler,
I2PSession isess,
int listenPort,
SAMv3DatagramServer dgServer)Build a Datagram Session on an existing i2p session
registered with the given nickname
Caller MUST call start(). |
SAMv3DatagramSession(String nick,
SAMv3DatagramServer dgServer)build a DatagramSession according to informations registered
with the given nickname
Caller MUST call start(). |
| Modifier and Type | Method and Description |
|---|---|
String | getNick()Get the session nickname. |
void | receiveDatagramBytes(Destination sender,
byte[] data,
int proto,
int fromPort,
int toPort)Receive a datagram from I2P and forward to the SAM client. |
void | stopDatagramReceiving()Stop receiving datagrams. |
messageReceived, sendBytes, sendBytes, shutDownclose, getDestination, getI2PSession, getListenPort, getListenProtocol, lookupDest, lookupDest, sendBytesThroughMessageSession, sendBytesThroughMessageSession, startclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, getDestination, getListenPort, getListenProtocol, lookupDest, sendBytes, sendBytes, startpublic SAMv3DatagramSession(String nick, Properties props, SAMv3Handler handler, I2PSession isess, int listenPort, SAMv3DatagramServer dgServer) throws IOException, DataFormatException, I2PSessionException
nick - nickname of the sessionIOExceptionDataFormatExceptionI2PSessionExceptionpublic SAMv3DatagramSession(String nick, SAMv3DatagramServer dgServer) throws IOException, DataFormatException, I2PSessionException, SAMException
nick - nickname of the sessionIOExceptionDataFormatExceptionI2PSessionExceptionSAMExceptionpublic String getNick()
public void receiveDatagramBytes(Destination sender, byte[] data, int proto, int fromPort, int toPort) throws IOException
receiveDatagramBytes in interface SAMDatagramReceiversender - the senderdata - the datagram payloadproto - the I2CP protocolfromPort - the I2CP from porttoPort - the I2CP to portIOException - if forwarding to the client failspublic void stopDatagramReceiving()
stopDatagramReceiving in interface SAMDatagramReceiver