Package net.i2p.client.streaming.impl
Interface MessageOutputStream.WriteStatus
- All Known Implementing Classes:
PacketLocal
- Enclosing class:
MessageOutputStream
public static interface MessageOutputStream.WriteStatus
Define a way to detect the status of a write
-
Method Summary
Modifier and TypeMethodDescriptionvoid
waitForAccept
(int maxWaitMs) Wait until the data written is accepted into the outbound pool, (i.e.void
waitForCompletion
(int maxWaitMs) Wait until the data written either fails or succeeds.boolean
Was the write was accepted.boolean
did the write fail?boolean
did the write succeed?
-
Method Details
-
waitForCompletion
Wait until the data written either fails or succeeds. Success means an ACK FROM THE FAR END.- Parameters:
maxWaitMs
- -1 = forever- Throws:
IOException
InterruptedException
-
waitForAccept
Wait until the data written is accepted into the outbound pool, (i.e. the outbound window is not full) which we throttle rather than accept arbitrary data and queue- Parameters:
maxWaitMs
- -1 = forever- Throws:
IOException
InterruptedException
-
writeAccepted
boolean writeAccepted()Was the write was accepted. aka did the socket not close? -
writeFailed
boolean writeFailed()did the write fail? -
writeSuccessful
boolean writeSuccessful()did the write succeed?
-