         else
             opts.cb?(undefined)
 
-    # define _handle_mesg in in derived class
-    handle_mesg: (socket, mesg) =>
-        @dbg("handle_mesg(id=#{socket.id})", misc.trunc(misc.to_json(mesg),300))
-        if mesg.event == 'ping'
-            @send_mesg
-                socket : socket
-                mesg   : message.pong(id:mesg.id)
-                call   : false
-        else
-            @_handle_mesg?(mesg)
 
 start_server = () ->
+    winston.debug("start_server")
     new Server
         token_file : program.token
         port       : program.port
+
 
 #############################################
 # Process command line arguments -- copy something based

        else
            opts.cb?()

    # define _handle_mesg in in derived class
    handle_mesg: (mesg) =>
        @dbg("handle_mesg", misc.trunc(misc.to_json(mesg),300))
        if mesg.event == 'ping'
            @send_mesg
                mesg   : message.pong()
                call   : false
        else
            @_handle_mesg?(mesg)

    ping: (cb) =>
        t0 = misc.mswalltime()
        @send_mesg


                    socket.on 'mesg', (type, mesg) =>
                        if type == 'json'
                            @dbg("mesg", misc.trunc(misc.to_json(mesg),200))
                            @emit("mesg_#{mesg.event}", mesg)
                        else
                            @dbg("mesg", "mesg of unknown type #{type} ignored")

                    reconnect = () =>
                        socket.removeAllListeners()
