func serveTCP(conn net.Conn) { defer conn.Close() defer func() { if err := recover(); err != nil { log.Println("serveTCP failed:", err) } }() jsonStream := oxweb.NewJSONConn(conn) ServeStream(jsonStream) }
func ServeWS(socket *websocket.Conn) { jsonStream := oxweb.NewJSONConn(socket) /* defer func() { if err := recover(); err != nil { log.Println("ServeWS failed:", err) } }() */ ServeStream(jsonStream) }