class SAMv2StreamSession extends SAMStreamSession
修飾子とタイプ | クラス | 説明 |
---|---|---|
class |
SAMv2StreamSession.SAMv2StreamSessionSocketReader |
SAM STREAM socket reader, running in its own thread.
|
_isOwnSession, _log, canCreate, DEFAULT_FORCE_FLUSH, forceFlush, PROP_FORCE_FLUSH, recv, server, SOCKET_HANDLER_BUF_SIZE, socketMgr
コンストラクタ | 説明 |
---|---|
SAMv2StreamSession(java.io.InputStream destStream,
java.lang.String dir,
java.util.Properties props,
SAMStreamReceiver recv) |
Create a new SAM STREAM session.
|
SAMv2StreamSession(java.lang.String dest,
java.lang.String dir,
java.util.Properties props,
SAMStreamReceiver recv) |
Create a new SAM STREAM session.
|
修飾子とタイプ | メソッド | 説明 |
---|---|---|
boolean |
connect(int id,
java.lang.String dest,
java.util.Properties props) |
Connect the SAM STREAM session to the specified Destination
|
protected SAMStreamSession.SAMStreamSessionSocketReader |
newSAMStreamSessionSocketReader(I2PSocket s,
int id) |
|
protected SAMStreamSession.StreamSender |
newStreamSender(I2PSocket s,
int id) |
Lets us push data through the stream without blocking, (even after exceeding
the I2PSocket's buffer)
|
boolean |
setReceiveLimit(int id,
long limit,
boolean nolimit) |
Send bytes through a SAM STREAM session.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkSocketHandlerId, close, closeConnection, createSocketHandler, getDestination, getListenPort, getListenProtocol, getSocketReader, removeSocketHandler, sendBytes, sendBytes, sendBytes, start
public SAMv2StreamSession(java.lang.String dest, java.lang.String dir, java.util.Properties props, SAMStreamReceiver recv) throws java.io.IOException, DataFormatException, SAMException
dest
- Base64-encoded destination and private keys (same format as PrivateKeyFile)dir
- Session direction ("RECEIVE", "CREATE" or "BOTH")props
- Properties to setup the I2P sessionrecv
- Object that will receive incoming datajava.io.IOException
DataFormatException
SAMException
public SAMv2StreamSession(java.io.InputStream destStream, java.lang.String dir, java.util.Properties props, SAMStreamReceiver recv) throws java.io.IOException, DataFormatException, SAMException
destStream
- Input stream containing the destination and private keys (same format as PrivateKeyFile)dir
- Session direction ("RECEIVE", "CREATE" or "BOTH")props
- Properties to setup the I2P sessionrecv
- Object that will receive incoming datajava.io.IOException
DataFormatException
SAMException
public boolean connect(int id, java.lang.String dest, java.util.Properties props) throws DataFormatException, SAMInvalidDirectionException
connect
クラス内 SAMStreamSession
id
- Unique id for the connectiondest
- Base64-encoded Destination to connect toprops
- Options to be used for connectionDataFormatException
- if the destination is not validSAMInvalidDirectionException
- if trying to connect through a
receive-only sessionprotected SAMStreamSession.StreamSender newStreamSender(I2PSocket s, int id) throws java.io.IOException
newStreamSender
クラス内 SAMStreamSession
s
- I2PSocketid
- Socket IDjava.io.IOException
protected SAMStreamSession.SAMStreamSessionSocketReader newSAMStreamSessionSocketReader(I2PSocket s, int id) throws java.io.IOException
newSAMStreamSessionSocketReader
クラス内 SAMStreamSession
java.io.IOException
public boolean setReceiveLimit(int id, long limit, boolean nolimit)
setReceiveLimit
クラス内 SAMStreamSession
id
- Stream IDlimit
- limitationnolimit
- true to limit