Package net.i2p.client.impl
Class ClientWriterRunner
java.lang.Object
net.i2p.client.impl.ClientWriterRunner
- All Implemented Interfaces:
Runnable
Copied from net.i2p.router.client
We need a single thread that writes so we don't have issues with
the Piped Streams used in InternalSocket.
- Author:
- zzz from net.i2p.router.client.ClientWriterRunner
-
Constructor Summary
ConstructorDescriptionClientWriterRunner
(OutputStream out, I2PSessionImpl session) As of 0.9.11 does not start the thread, caller must call startWriting() -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMessage
(I2CPMessage msg) Add this message to the writer's queue.void
run()
void
void
No more messages - dont even try to send what we have
-
Constructor Details
-
ClientWriterRunner
As of 0.9.11 does not start the thread, caller must call startWriting()
-
-
Method Details
-
startWriting
public void startWriting()- Since:
- 0.9.11
-
addMessage
Add this message to the writer's queue. Blocking if queue is full.- Throws:
I2PSessionException
- if we wait too long or are interrupted
-
stopWriting
public void stopWriting()No more messages - dont even try to send what we have -
run
public void run()
-