function ilxClientConnectedCb(pluginHandle, flowHandle, clientStreamHandle, serverStreamHandle,
    isTcp)
{
    var self = pluginHandle.owner;
    var flow = new ILXFlow(flowHandle, clientStreamHandle, serverStreamHandle, isTcp);

    var local = {};
    clientStreamHandle.getsockname(local);
    var listener = ILXListeners.get(local.address, local.port, isTcp?"TCP":"");

    if (listener === undefined) {
        // There are no matching listeners. Deliver the connection to the ILXPlugin object if it
        // is listening on the connect event or was started as an HTTP server, otherwise end the
        // flow.
        if (self._httpServer === true) {
            if (self._options.disableServer) {
                flow.server.end();
            }
            self._httpConnection(flow.client);
        }
        else if (self.listeners('connect').length > 0) {
            if (self._options.disableServer) {
                flow.server.end();
            }
            self.emit("connect", flow);
        }
        else {
            flow.end();
        }
    }
    else {
        listener.newFlow(flow);
    }
}
/**
 * If the client stream matches an ILXPluginServer or ILXPluginHttpServer listener the stream
 * will be handed to the server object. If the plugin has been started using
 * ILXPlugin.startHttpServer the client stream will be handed to the native node.js HTTP
 * implementation and HTTP requests will be passed to the callback function given to
 * ILXPlugin.startHttpServer. The ILXPlugin#connect event will be emitted if the plugin has
 * been started using ILXPlugin.start. Note that only one of these actions will be taken.
 * The isTcp boolean indicates if the flow is TCP based - this is the only supported option.
 *
 * @fires ILXPlugin#connect
 */
If the client stream matches an ILXPluginServer or ILXPluginHttpServer listener the stream
will be handed to the server object. If the plugin has been started using
ILXPlugin.startHttpServer the client stream will be handed to the native node.js HTTP
implementation and HTTP requests will be passed to the callback function given to
ILXPlugin.startHttpServer. The ILXPlugin#connect event will be emitted if the plugin has
been started using ILXPlugin.start. Note that only one of these actions will be taken.
The isTcp boolean indicates if the flow is TCP based - this is the only supported option.


If the client stream matches an ILXPluginServer or ILXPluginHttpServer listener the stream will be handed to the server object . If the plugin has been started using ILXPlugin . startHttpServer the client stream will be handed to the native node . js HTTP implementation and HTTP requests will be passed to the callback function given to ILXPlugin . startHttpServer . The ILXPlugin#connect event will be emitted if the plugin has been started using ILXPlugin . start . Note that only one of these actions will be taken . The isTcp boolean indicates if the flow is TCP based - this is the only supported option .
function ilxClientConnectedCb(pluginHandle, flowHandle, clientStreamHandle, serverStreamHandle,
    isTcp)
{
    var self = pluginHandle.owner;
    var flow = new ILXFlow(flowHandle, clientStreamHandle, serverStreamHandle, isTcp);
    var local = {};
    clientStreamHandle.getsockname(local);
    var listener = ILXListeners.get(local.address, local.port, isTcp?"TCP":"");
    if (listener === undefined) {
        if (self._httpServer === true) {
            if (self._options.disableServer) {
                flow.server.end();
            }
            self._httpConnection(flow.client);
        }
        else if (self.listeners('connect').length > 0) {
            if (self._options.disableServer) {
                flow.server.end();
            }
            self.emit("connect", flow);
        }
        else {
            flow.end();
        }
    }
    else {
        listener.newFlow(flow);
    }
}
function ilxClientConnectedCb ( pluginHandle , flowHandle , clientStreamHandle , serverStreamHandle , isTcp ) { var self = pluginHandle . owner ; var flow = new ILXFlow ( flowHandle , clientStreamHandle , serverStreamHandle , isTcp ) ; var local = { } ; clientStreamHandle . getsockname ( local ) ; var listener = ILXListeners . get ( local . address , local . port , isTcp ? "TCP" : "" ) ; if ( listener === undefined ) { if ( self . _httpServer === true ) { if ( self . _options . disableServer ) { flow . server . end ( ) ; } self . _httpConnection ( flow . client ) ; } else if ( self . listeners ( 'connect' ) . length > 0 ) { if ( self . _options . disableServer ) { flow . server . end ( ) ; } self . emit ( "connect" , flow ) ; } else { flow . end ( ) ; } } else { listener . newFlow ( flow ) ; } }
If the client stream matches an ILXPluginServer or ILXPluginHttpServer listener the stream
 will be handed to the server object.
If the client stream matches an ILXPluginServer or ILXPluginHttpServer listener the stream will be handed to the server object .
// There are no matching listeners. Deliver the connection to the ILXPlugin object if it // is listening on the connect event or was started as an HTTP server, otherwise end the // flow.