SAMv1Handler
, SAMv2Handler
interface SAMStreamReceiver
修飾子とタイプ | メソッド | 説明 |
---|---|---|
void |
notifyStreamDisconnection(int id,
java.lang.String result,
java.lang.String msg) |
Notify that a connection has been closed
FIXME: this interface should be cleaner
|
void |
notifyStreamIncomingConnection(int id,
Destination dest) |
Notify about a new incoming connection
|
void |
notifyStreamOutgoingConnection(int id,
java.lang.String result,
java.lang.String msg) |
Notify about a new outgoing connection
|
void |
notifyStreamSendBufferFree(int id) |
Notifies that the outwards buffer is free for writing
|
void |
receiveStreamBytes(int id,
java.nio.ByteBuffer data) |
Transmit a byte array from I2P to a SAM client.
|
void |
stopStreamReceiving() |
Stop receiving data.
|
void |
streamSendAnswer(int id,
java.lang.String result,
java.lang.String bufferState) |
Sends the result of a stream send operation
|
void streamSendAnswer(int id, java.lang.String result, java.lang.String bufferState) throws java.io.IOException
id
- Stream IDresult
- informationbufferState
- state of the bufferjava.io.IOException
void notifyStreamSendBufferFree(int id) throws java.io.IOException
id
- stream IDjava.io.IOException
void notifyStreamIncomingConnection(int id, Destination dest) throws java.io.IOException
id
- New connection iddest
- Destinationjava.io.IOException
void notifyStreamOutgoingConnection(int id, java.lang.String result, java.lang.String msg) throws java.io.IOException
id
- New connection idresult
- message resultmsg
- Messagejava.io.IOException
void receiveStreamBytes(int id, java.nio.ByteBuffer data) throws java.io.IOException
id
- Connection iddata
- Byte array to be receivedjava.io.IOException
void notifyStreamDisconnection(int id, java.lang.String result, java.lang.String msg) throws java.io.IOException
id
- Connection idresult
- Disconnection reason ("OK" or something else)msg
- Error message, if anyjava.io.IOException
void stopStreamReceiving()