interface SAMStreamReceiver
Modifier and Type | Method and Description |
---|---|
void |
notifyStreamDisconnection(int id,
String result,
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,
String result,
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,
ByteBuffer data)
Transmit a byte array from I2P to a SAM client.
|
void |
stopStreamReceiving()
Stop receiving data.
|
void |
streamSendAnswer(int id,
String result,
String bufferState)
Sends the result of a stream send operation
|
void streamSendAnswer(int id, String result, String bufferState) throws IOException
id
- Stream IDresult
- informationbufferState
- state of the bufferIOException
void notifyStreamSendBufferFree(int id) throws IOException
id
- stream IDIOException
void notifyStreamIncomingConnection(int id, Destination dest) throws IOException
id
- New connection iddest
- DestinationIOException
void notifyStreamOutgoingConnection(int id, String result, String msg) throws IOException
id
- New connection idresult
- message resultmsg
- MessageIOException
void receiveStreamBytes(int id, ByteBuffer data) throws IOException
id
- Connection iddata
- Byte array to be receivedIOException
void notifyStreamDisconnection(int id, String result, String msg) throws IOException
id
- Connection idresult
- Disconnection reason ("OK" or something else)msg
- Error message, if anyIOException
void stopStreamReceiving()