- protected void doWriteData(final byte[] data, final int off, final long len) throws IOException {
- // If we're already closing, ignore incoming data
- if (isClosing()) {
- return;
- }
- // TODO: consider using context's allocator for heap buffer here
- final int reqLen = (int) len;
- pipeline.firstContext().fireChannelRead(Unpooled.copiedBuffer(data, off, reqLen));
- if (reqLen > 0) {
- getLocalWindow().release(reqLen);
- }
- }
-
- @Override
- protected void doWriteExtendedData(final byte[] data, final int off, final long len) throws IOException {
- // If we're already closing, ignore incoming data
- if (isClosing()) {
- return;
- }
-
- LOG.debug("Discarding {} bytes of extended data", len);
- if (len > 0) {
- getLocalWindow().release(len);
- }
- }
-
- @Override
- public void close() {
- super.close(false);