@Override
    protected void onInit() throws IOException
    {
        if (socket == null)
        {
            socket = protocol.getChannels().newSocket();
            socket.configureBlocking( false );
            socket.connect( address );
            
            while (!socket.finishConnect()) {
                // loop until connected
            }
        }
        else
        {
            socket.configureBlocking( false );
        }
    }