org.mpisws.p2p.transport.util
Class BufferReaderWriter<Identifier>
java.lang.Object
org.mpisws.p2p.transport.util.BufferReaderWriter<Identifier>
public class BufferReaderWriter<Identifier>
- extends Object
Concurrently reads a buffer and writes a buffer at the same time,
then calls the continuation when done.
- Author:
- Jeff Hoye
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BufferReaderWriter
public BufferReaderWriter(P2PSocket<Identifier> sock,
ByteBuffer writeMe,
boolean writeSize,
Continuation<ByteBuffer,Exception> c)
BufferReaderWriter
public BufferReaderWriter(P2PSocket<Identifier> sock,
ByteBuffer writeMe,
boolean writeSize,
Continuation<ByteBuffer,Exception> c,
int readSize)
- Parameters:
sock - the socket to read/write from/towriteMe - the bytes to writewriteSize - true if I should write a size header before the buffer, false if it's fixed sizec - the continuation to notifyreadSize - the size of the buffer to read, -1 if it should read a size header first
done
public void done(Exception e)
Copyright © 2010. All Rights Reserved.