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 TypeMethodDescriptionvoidwaitForAccept(int maxWaitMs) Wait until the data written is accepted into the outbound pool, (i.e.voidwaitForCompletion(int maxWaitMs) Wait until the data written either fails or succeeds.booleanWas the write was accepted.booleandid the write fail?booleandid 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:
IOExceptionInterruptedException
-
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:
IOExceptionInterruptedException
-
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?
-