net.i2p.sam
public class SAMv3Handler extends SAMv1Handler
Modifier and Type | Class and Description |
---|---|
static class |
SAMv3Handler.DatagramServer |
static class |
SAMv3Handler.MessageDispatcher |
(package private) static interface |
SAMv3Handler.Session |
class |
SAMv3Handler.SessionRecord |
static class |
SAMv3Handler.SessionsDB |
Modifier and Type | Field and Description |
---|---|
protected SAMv3DatagramSession |
datagramSession |
protected SAMv3RawSession |
rawSession |
protected SAMv3Handler.Session |
session |
static SAMv3Handler.SessionsDB |
sSessionsHash |
(package private) boolean |
stolenSocket |
(package private) boolean |
streamForwardingSocket |
protected SAMv3StreamSession |
streamSession |
__id, _id, verMajorId, verMinorId
Constructor and Description |
---|
SAMv3Handler(SocketChannel s,
int verMajor,
int verMinor)
Create a new SAM version 3 handler.
|
SAMv3Handler(SocketChannel s,
int verMajor,
int verMinor,
Properties i2cpProps)
Create a new SAM version 3 handler.
|
execDatagramMessage, execDestMessage, execNamingMessage, execRawMessage, execStreamClose, execStreamSend, newSAMStreamSession, notifyStreamDisconnection, notifyStreamIncomingConnection, notifyStreamOutgoingConnection, notifyStreamSendBufferFree, receiveDatagramBytes, receiveRawBytes, receiveStreamBytes, stopDatagramReceiving, stopRawReceiving, stopStreamReceiving, streamSendAnswer
closeClientSocket, getClientSocket, getWriteLock, run, setBridge, shouldStop, startHandling, stopHandling, toString, writeBytes, writeBytes, writeString, writeString
protected SAMv3RawSession rawSession
protected SAMv3DatagramSession datagramSession
protected SAMv3StreamSession streamSession
protected SAMv3Handler.Session session
public static SAMv3Handler.SessionsDB sSessionsHash
boolean stolenSocket
boolean streamForwardingSocket
public SAMv3Handler(SocketChannel s, int verMajor, int verMinor) throws SAMException, IOException
s
- Socket attached to a SAM clientverMajor
- SAM major version to manage (should be 3)verMinor
- SAM minor version to manageSAMException
IOException
public SAMv3Handler(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 3)verMinor
- SAM minor version to managei2cpProps
- properties to configure the I2CP connection (host, port, etc)SAMException
IOException
protected SAMRawSession getRawSession()
getRawSession
in class SAMv1Handler
protected SAMDatagramSession getDatagramSession()
getDatagramSession
in class SAMv1Handler
protected SAMStreamSession getStreamSession()
getStreamSession
in class SAMv1Handler
public boolean verifVersion()
verifVersion
in class SAMv1Handler
public String getClientIP()
public void stealSocket()
public void handle()
SAMHandler
handle
in class SAMv1Handler
protected void die()
protected boolean execSessionMessage(String opcode, Properties props)
execSessionMessage
in class SAMv1Handler
SAMv3StreamSession newSAMStreamSession(String login) throws IOException, DataFormatException, SAMException
SAMv3RawSession newSAMRawSession(String login) throws IOException, DataFormatException, SAMException, I2PSessionException
SAMv3DatagramSession newSAMDatagramSession(String login) throws IOException, DataFormatException, SAMException, I2PSessionException
protected boolean execStreamMessage(String opcode, Properties props)
execStreamMessage
in class SAMv1Handler
protected boolean execStreamConnect(Properties props)
execStreamConnect
in class SAMv1Handler
protected boolean execStreamForwardIncoming(Properties props)
protected boolean execStreamAccept(Properties props)
public void notifyStreamResult(boolean verbose, String result, String message) throws IOException
IOException
public void notifyStreamIncomingConnection(Destination d) throws IOException
IOException
public static void notifyStreamIncomingConnection(SocketChannel client, Destination d) throws IOException
IOException