summaryrefslogtreecommitdiff
path: root/ext/websocket/autobahn/autobahn_server.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/websocket/autobahn/autobahn_server.js')
-rw-r--r--ext/websocket/autobahn/autobahn_server.js20
1 files changed, 0 insertions, 20 deletions
diff --git a/ext/websocket/autobahn/autobahn_server.js b/ext/websocket/autobahn/autobahn_server.js
deleted file mode 100644
index c678dfc1a..000000000
--- a/ext/websocket/autobahn/autobahn_server.js
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
-import { parse } from "../../../test_util/std/flags/mod.ts";
-
-const { port } = parse(Deno.args, {
- number: ["port"],
- default: {
- port: 6969,
- },
-});
-
-const { serve } = Deno;
-
-// A message-based WebSocket echo server.
-serve((request) => {
- const { socket, response } = Deno.upgradeWebSocket(request);
- socket.onmessage = (event) => {
- socket.send(event.data);
- };
- return response;
-}, { port });