From 08902abf979baa37b1927788eed4eacd7fb9c726 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 24 Jun 2022 19:19:05 -0500 Subject: [PATCH] initial commit --- tcplexer.ts | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 tcplexer.ts diff --git a/tcplexer.ts b/tcplexer.ts new file mode 100644 index 0000000..aea60a0 --- /dev/null +++ b/tcplexer.ts @@ -0,0 +1,6 @@ +import { copy } from "https://deno.land/std@0.145.0/streams/conversion.ts"; +const listener = Deno.listen({ port: 8080 }); +console.log("listening on 0.0.0.0:8080"); +for await (const conn of listener) { + copy(conn, conn).finally(() => conn.close()); +}