protected abstract static class SAMStreamSession.StreamSender extends Object implements Runnable
Modifier and Type | Field and Description |
---|---|
protected int |
_id |
protected I2PSocket |
i2pSocket |
Constructor and Description |
---|
StreamSender(I2PSocket s,
int id) |
Modifier and Type | Method and Description |
---|---|
abstract void |
run() |
abstract void |
sendBytes(InputStream in,
int size)
Send bytes through the SAM STREAM session socket sender
|
abstract void |
shutDownGracefully()
Stop a SAM STREAM session socket sender gracefully: stop the
sender thread once all pending data has been sent.
|
abstract void |
stopRunning()
Stop a SAM STREAM session socket sender thread immediately
|
protected final int _id
protected final I2PSocket i2pSocket
public StreamSender(I2PSocket s, int id) throws IOException
IOException
public abstract void sendBytes(InputStream in, int size) throws IOException
in
- Data input streamsize
- Count of bytes to sendIOException
- if the client didnt provide enough datapublic abstract void stopRunning()
public abstract void shutDownGracefully()