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
ChannelStreamWriter
writeData
in interface ChannelStreamWriter
buffer
- 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 Closeable
close
in interface AutoCloseable
close
in interface Channel
IOException
Copyright © 2008–2024 The Apache Software Foundation. All rights reserved.