Closeable
, AutoCloseable
, SAMMessageSess
, SAMRawReceiver
, Session
class SAMv3RawSession extends SAMRawSession implements Session, SAMRawReceiver
_isOwnSession, _log
RAW_SIZE_MAX, recv
Constructor | Description |
---|---|
SAMv3RawSession(String nick,
Properties props,
SAMv3Handler handler,
I2PSession isess,
int listenProtocol,
int listenPort,
SAMv3DatagramServer dgServer) |
Build a Raw Session on an existing i2p session
registered with the given nickname
Caller MUST call start().
|
SAMv3RawSession(String nick,
SAMv3DatagramServer dgServer) |
Build a Raw Datagram Session according to information
registered with the given nickname
Caller MUST call start().
|
Modifier and Type | Method | Description |
---|---|---|
String |
getNick() |
|
(package private) static SocketAddress |
getSocketAddress(Properties props,
SAMv3Handler handler) |
|
void |
receiveRawBytes(byte[] data,
int proto,
int fromPort,
int toPort) |
Send a byte array to a SAM client, without informations
regarding the sender.
|
void |
stopRawReceiving() |
Stop receiving data.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, getDestination, getListenPort, getListenProtocol, sendBytes, sendBytes, start
close, getDestination, getI2PSession, getListenPort, getListenProtocol, sendBytesThroughMessageSession, sendBytesThroughMessageSession, start
messageReceived, sendBytes, sendBytes, shutDown
public SAMv3RawSession(String nick, SAMv3DatagramServer dgServer) throws IOException, DataFormatException, I2PSessionException
nick
- nickname of the sessionIOException
DataFormatException
I2PSessionException
public SAMv3RawSession(String nick, Properties props, SAMv3Handler handler, I2PSession isess, int listenProtocol, int listenPort, SAMv3DatagramServer dgServer) throws IOException, DataFormatException, I2PSessionException
nick
- nickname of the sessionIOException
DataFormatException
I2PSessionException
static SocketAddress getSocketAddress(Properties props, SAMv3Handler handler)
public void receiveRawBytes(byte[] data, int proto, int fromPort, int toPort) throws IOException
SAMRawReceiver
receiveRawBytes
in interface SAMRawReceiver
data
- Byte array to be receivedproto
- I2CP protocolfromPort
- I2CP from porttoPort
- I2CP to portIOException
public void stopRawReceiving()
SAMRawReceiver
stopRawReceiving
in interface SAMRawReceiver