net.i2p.sam
protected class SAMv2StreamSession.v2StreamSender extends SAMStreamSession.StreamSender
Constructor and Description |
---|
SAMv2StreamSession.v2StreamSender(I2PSocket s,
int id) |
Modifier and Type | Method and Description |
---|---|
void |
run() |
void |
sendBytes(InputStream in,
int size)
Send bytes through the SAM STREAM session socket sender
|
void |
shutDownGracefully()
Stop a SAM STREAM session socket sender gracefully: stop the
sender thread once all pending data has been sent.
|
void |
stopRunning()
Stop a SAM STREAM session socket sender thread immediately
|
public SAMv2StreamSession.v2StreamSender(I2PSocket s, int id) throws IOException
IOException
public void sendBytes(InputStream in, int size) throws IOException
sendBytes
in class SAMStreamSession.StreamSender
in
- Data stream of data to sendsize
- Count of bytes to sendIOException
- if the client didnt provide enough datapublic void stopRunning()
stopRunning
in class SAMStreamSession.StreamSender
public void shutDownGracefully()
shutDownGracefully
in class SAMStreamSession.StreamSender
public void run()
run
in interface Runnable
run
in class SAMStreamSession.StreamSender