class SAMv3DatagramSession extends SAMDatagramSession implements SAMv3Handler.Session, SAMDatagramReceiver
SAMMessageSession.SAMMessageSessionHandler
DGRAM_SIZE_MAX, recv
_log
Constructor and Description |
---|
SAMv3DatagramSession(String nick)
build a DatagramSession according to informations registered
with the given nickname
|
Modifier and Type | Method and Description |
---|---|
String |
getNick() |
void |
receiveDatagramBytes(Destination sender,
byte[] data)
Send a byte array to a SAM client.
|
void |
stopDatagramReceiving()
Stop receiving data.
|
messageReceived, sendBytes, shutDown
close, getDestination, getI2PSession, sendBytesThroughMessageSession
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, sendBytes
public SAMv3DatagramSession(String nick) throws IOException, DataFormatException, I2PSessionException, SAMException
nick
- nickname of the sessionIOException
DataFormatException
I2PSessionException
SAMException
public String getNick()
getNick
in interface SAMv3Handler.Session
public void receiveDatagramBytes(Destination sender, byte[] data) throws IOException
SAMDatagramReceiver
receiveDatagramBytes
in interface SAMDatagramReceiver
sender
- Destinationdata
- Byte array to be receivedIOException
public void stopDatagramReceiving()
SAMDatagramReceiver
stopDatagramReceiving
in interface SAMDatagramReceiver