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() |
void |
receiveDatagramBytes(Destination sender,
byte[] data,
int proto,
int fromPort,
int toPort)
Send a byte array to a SAM client.
|
void |
stopDatagramReceiving()
Stop receiving data.
|
messageReceived, sendBytes, sendBytes, shutDown
close, getDestination, getI2PSession, getListenPort, getListenProtocol, sendBytesThroughMessageSession, sendBytesThroughMessageSession, start
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, getDestination, getListenPort, getListenProtocol, sendBytes, sendBytes, start
public SAMv3DatagramSession(String nick, SAMv3DatagramServer dgServer) throws IOException, DataFormatException, I2PSessionException, SAMException
nick
- nickname of the sessionIOException
DataFormatException
I2PSessionException
SAMException
public SAMv3DatagramSession(String nick, Properties props, SAMv3Handler handler, I2PSession isess, int listenPort, SAMv3DatagramServer dgServer) throws IOException, DataFormatException, I2PSessionException
nick
- nickname of the sessionIOException
DataFormatException
I2PSessionException
public void receiveDatagramBytes(Destination sender, byte[] data, int proto, int fromPort, int toPort) throws IOException
SAMDatagramReceiver
receiveDatagramBytes
in interface SAMDatagramReceiver
sender
- Destinationdata
- Byte array to be receivedproto
- I2CP protocolfromPort
- I2CP from porttoPort
- I2CP to portIOException
public void stopDatagramReceiving()
SAMDatagramReceiver
stopDatagramReceiving
in interface SAMDatagramReceiver