net.i2p.sam
public class SAMv3DatagramSession extends SAMDatagramSession implements SAMv3Handler.Session, SAMDatagramReceiver
SAMMessageSession.SAMMessageSessionHandler
Modifier and Type | Field and Description |
---|---|
(package private) SocketAddress |
clientAddress |
(package private) SAMv3Handler |
handler |
(package private) String |
nick |
(package private) SAMv3Handler.DatagramServer |
server |
DGRAM_SIZE_MAX, recv
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
SAMv3Handler handler
SAMv3Handler.DatagramServer server
String nick
SocketAddress clientAddress
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