protected abstract static class SAMStreamSession.StreamSender extends Object implements Runnable
| Modifier and Type | Field and Description |
|---|---|
protected int | _id_id. |
protected I2PSocket | i2pSocketi2pSocket. |
| Constructor and Description |
|---|
StreamSender(I2PSocket s,
int id)Create a new StreamSender. |
| Modifier and Type | Method and Description |
|---|---|
abstract void | run()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
s - the I2PSocket to write toid - the stream idIOException - if the output stream cannot be obtainedpublic 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 shutDownGracefully()
public abstract void stopRunning()