class BioNetClient extends NetClientBase {

    public BioNetClient() {
        super(true);
    }

    @Override
    protected void createConnectionInternal(Map<String, String> config, NetNode node,
            AsyncConnectionManager connectionManager, AsyncCallback<AsyncConnection> ac,
            Scheduler scheduler) {<FILL_FUNCTION_BODY>}
}

        InetSocketAddress inetSocketAddress = node.getInetSocketAddress();
        int networkTimeout = MapUtils.getInt(config, ConnectionSetting.NETWORK_TIMEOUT.name(),
                Constants.DEFAULT_NETWORK_TIMEOUT);
        Socket socket = null;
        try {
            socket = new Socket();
            socket.setSoTimeout(networkTimeout);
            initSocket(socket, config);
            socket.connect(inetSocketAddress, networkTimeout);

            AsyncConnection conn;
            BioWritableChannel writableChannel = new BioWritableChannel(config, socket,
                    inetSocketAddress);
            if (connectionManager != null) {
                conn = connectionManager.createConnection(writableChannel, false, null);
            } else {
                conn = new TcpClientConnection(writableChannel, this, 1);
            }
            conn.setInetSocketAddress(inetSocketAddress);
            addConnection(inetSocketAddress, conn);
            ac.setAsyncResult(conn);
        } catch (Exception e) {
            if (socket != null) {
                try {
                    socket.close();
                } catch (Throwable t) {
                }
            }
            ac.setAsyncResult(e);
        }
    
<methods>public void <init>(boolean) ,public void addConnection(java.net.InetSocketAddress, com.lealone.net.AsyncConnection) ,public void checkTimeout(long) ,public void close() ,public Future<com.lealone.net.AsyncConnection> createConnection(Map<java.lang.String,java.lang.String>, com.lealone.net.NetNode, com.lealone.net.AsyncConnectionManager, com.lealone.db.scheduler.Scheduler) ,public boolean isClosed() ,public boolean isThreadSafe() ,public void removeConnection(com.lealone.net.AsyncConnection) <variables>private final non-sealed Map<java.net.InetSocketAddress,com.lealone.net.AsyncConnectionPool> asyncConnections,private final java.util.concurrent.atomic.AtomicBoolean closed,private final non-sealed boolean isThreadSafe