All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.zodiac.sdk.simplenetty.channel.AbstractNioSocketChannel Maven / Gradle / Ivy

There is a newer version: 1.6.8
Show newest version
package org.zodiac.sdk.simplenetty.channel;

import java.nio.ByteBuffer;

import org.zodiac.sdk.simplenetty.core.EventLoop;

public abstract class AbstractNioSocketChannel extends AbstractNioChannel {

    ByteBuffer readBuffer;
    ByteBuffer writeBuffer;

    public AbstractNioSocketChannel(EventLoop loop) {
        super(loop);
        init();
    }

    private void init() {
        Integer bufferSize = ChannelConfig.getChildOption(ChannelOption.BUFFER_SIZE.name, Integer.class);
        if (bufferSize == null) {
            bufferSize = ChannelOption.BUFFER_SIZE.value;
        }
        readBuffer = ByteBuffer.allocate(bufferSize);
        writeBuffer = ByteBuffer.allocate(bufferSize);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy