public class DefaultChannelStreamWriter extends Object implements ChannelStreamWriter
Channel.writePacket(Buffer) method.| Modifier and Type | Field and Description |
|---|---|
protected Channel |
channel |
protected boolean |
closed |
| Constructor and Description |
|---|
DefaultChannelStreamWriter(Channel channel) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
isOpen() |
IoWriteFuture |
writeData(Buffer buffer)
Encode and send the given data packet buffer.
|
protected final Channel channel
protected volatile boolean closed
public DefaultChannelStreamWriter(Channel channel)
public IoWriteFuture writeData(Buffer buffer) throws IOException
ChannelStreamWriterwriteData in interface ChannelStreamWriterbuffer - the buffer to encode and send. NOTE: the buffer must not be touched until the returned
write future is completed.IoWriteFuture that can be used to check when the packet has actually been sentIOException - if an error occurred when encoding or sending the packetpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface ChannelIOExceptionCopyright © 2008–2021 The Apache Software Foundation. All rights reserved.