class SAMv3RawSession extends SAMRawSession implements Session, SAMRawReceiver
RAW_SIZE_MAX, recv_isOwnSession, _log| Constructor and 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 and Description |
|---|---|
String | getNick()Get the session nickname. |
(package private) static SocketAddress | getSocketAddress(Properties props,
SAMv3Handler handler)Get the socket address from session properties. |
void | receiveRawBytes(byte[] data,
int proto,
int fromPort,
int toPort)Receive raw data from I2P and forward to the SAM client. |
void | stopRawReceiving()Stop receiving raw data. |
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 SAMv3RawSession(String nick, Properties props, SAMv3Handler handler, I2PSession isess, int listenProtocol, int listenPort, SAMv3DatagramServer dgServer) throws IOException, DataFormatException, I2PSessionException
nick - nickname of the sessionIOExceptionDataFormatExceptionI2PSessionExceptionpublic SAMv3RawSession(String nick, SAMv3DatagramServer dgServer) throws IOException, DataFormatException, I2PSessionException
nick - nickname of the sessionIOExceptionDataFormatExceptionI2PSessionExceptionpublic String getNick()
static SocketAddress getSocketAddress(Properties props, SAMv3Handler handler)
props - the session properties containing PORT and optionally HOSThandler - the SAM handler for client IP fallbackpublic void receiveRawBytes(byte[] data,
int proto,
int fromPort,
int toPort)
throws IOExceptionreceiveRawBytes in interface SAMRawReceiverdata - the raw data payloadproto - the I2CP protocolfromPort - the I2CP from porttoPort - the I2CP to portIOException - if forwarding to the client failspublic void stopRawReceiving()
stopRawReceiving in interface SAMRawReceiver