diff options
Diffstat (limited to 'ext/websocket/autobahn/autobahn_server.js')
-rw-r--r-- | ext/websocket/autobahn/autobahn_server.js | 20 |
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 }); |