Package net.i2p.sam
Class SAMStreamSession.StreamSender
java.lang.Object
net.i2p.sam.SAMStreamSession.StreamSender
- All Implemented Interfaces:
Runnable
- Enclosing class:
SAMStreamSession
Lets us push data through the stream without blocking, (even after exceeding
the I2PSocket's buffer)
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
run()
abstract void
sendBytes
(InputStream in, int size) Send bytes through the SAM STREAM session socket senderabstract void
Stop a SAM STREAM session socket sender gracefully: stop the sender thread once all pending data has been sent.abstract void
Stop a SAM STREAM session socket sender thread immediately
-
Field Details
-
_id
protected final int _id -
i2pSocket
-
-
Constructor Details
-
StreamSender
- Throws:
IOException
-
-
Method Details
-
sendBytes
Send bytes through the SAM STREAM session socket sender- Parameters:
in
- Data input streamsize
- Count of bytes to send- Throws:
IOException
- if the client didnt provide enough data
-
stopRunning
public abstract void stopRunning()Stop a SAM STREAM session socket sender thread immediately -
shutDownGracefully
public abstract void shutDownGracefully()Stop a SAM STREAM session socket sender gracefully: stop the sender thread once all pending data has been sent. -
run
public abstract void run()
-