class SAMv2Handler extends SAMv1Handler implements SAMRawReceiver, SAMDatagramReceiver, SAMStreamReceiver
_id, datagramSession, rawSession, streamSession
Constructor and Description |
---|
SAMv2Handler(SocketChannel s,
int verMajor,
int verMinor)
Create a new SAM version 2 handler.
|
SAMv2Handler(SocketChannel s,
int verMajor,
int verMinor,
Properties i2cpProps)
Create a new SAM version 2 handler.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
execStreamMessage(String opcode,
Properties props) |
(package private) SAMStreamSession |
newSAMStreamSession(String destKeystream,
String direction,
Properties props) |
boolean |
verifVersion() |
execDatagramMessage, execDestMessage, execNamingMessage, execRawMessage, execSessionMessage, execStreamClose, execStreamConnect, execStreamSend, getDatagramSession, getRawSession, getStreamSession, handle, notifyStreamDisconnection, notifyStreamIncomingConnection, notifyStreamOutgoingConnection, notifyStreamSendBufferFree, receiveDatagramBytes, receiveRawBytes, receiveStreamBytes, stopDatagramReceiving, stopRawReceiving, stopStreamReceiving, streamSendAnswer
closeClientSocket, getClientSocket, getWriteLock, run, setBridge, shouldStop, startHandling, stopHandling, toString, writeBytes, writeBytes, writeString, writeString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
receiveRawBytes, stopRawReceiving
receiveDatagramBytes, stopDatagramReceiving
notifyStreamDisconnection, notifyStreamIncomingConnection, notifyStreamOutgoingConnection, notifyStreamSendBufferFree, receiveStreamBytes, stopStreamReceiving, streamSendAnswer
public SAMv2Handler(SocketChannel s, int verMajor, int verMinor) throws SAMException, IOException
s
- Socket attached to a SAM clientverMajor
- SAM major version to manage (should be 2)verMinor
- SAM minor version to manageSAMException
IOException
public SAMv2Handler(SocketChannel s, int verMajor, int verMinor, Properties i2cpProps) throws SAMException, IOException
s
- Socket attached to a SAM clientverMajor
- SAM major version to manage (should be 2)verMinor
- SAM minor version to managei2cpProps
- properties to configure the I2CP connection (host, port, etc)SAMException
IOException
public boolean verifVersion()
verifVersion
in class SAMv1Handler
SAMStreamSession newSAMStreamSession(String destKeystream, String direction, Properties props) throws IOException, DataFormatException, SAMException
protected boolean execStreamMessage(String opcode, Properties props)
execStreamMessage
in class SAMv1Handler