lib/service.js
function createServer(serverName) {
        console.log("creating server", serverName)
        var server = servers[serverName] = net.createServer(handleConnection)
        ports.service(serverName, listen)

        function handleConnection(connection) {
            console.log("got incoming connection", connection)
            var stream = proxy.connect(serverName)
                , buffer = PauseStream().pause()
                , intermediate = through(stringer)

            connection.pipe(buffer)

            process.nextTick(pipe)

            function pipe() {
                buffer.pipe(intermediate)
                    .pipe(stream).pipe(connection)

                buffer.resume()
            }
        }

        function listen(port, ready) {
            server.listen(port, ready)
        }
    }
function createServer(serverName) {
        console.log("creating server", serverName)
        var server = servers[serverName] = net.createServer(handleConnection)
        ports.service(serverName, listen)

        function handleConnection(connection) {
            console.log("got incoming connection", connection)
            var stream = proxy.connect(serverName)
                , buffer = PauseStream().pause()
                , intermediate = through(stringer)

            connection.pipe(buffer)

            process.nextTick(pipe)

            function pipe() {
                buffer.pipe(intermediate)
                    .pipe(stream).pipe(connection)

                buffer.resume()
            }
        }

        function listen(port, ready) {
            server.listen(port, ready)
        }
    }
function createServer ( serverName ) { console . log ( "creating server" , serverName ) var server = servers [ serverName ] = net . createServer ( handleConnection ) ports . service ( serverName , listen ) function handleConnection ( connection ) { console . log ( "got incoming connection" , connection ) var stream = proxy . connect ( serverName ) , buffer = PauseStream ( ) . pause ( ) , intermediate = through ( stringer ) connection . pipe ( buffer ) process . nextTick ( pipe ) function pipe ( ) { buffer . pipe ( intermediate ) . pipe ( stream ) . pipe ( connection ) buffer . resume ( ) } } function listen ( port , ready ) { server . listen ( port , ready ) } }
create seaport service when server stream comes up
create seaport service when server stream comes up