WIP
This commit is contained in:
parent
8083295c42
commit
c2b37f5645
4
6.ts
4
6.ts
|
@ -21,7 +21,9 @@ function chatSession(conn: Deno.Conn) {
|
|||
|
||||
async function serve(conn: Deno.Conn) {
|
||||
const reader = new BufReader(conn);
|
||||
reader.peek(1);
|
||||
const type = await reader.peek(1);
|
||||
if (!type) throw new Error("failed to peek start of packet");
|
||||
console.log(type);
|
||||
}
|
||||
|
||||
for await (const conn of Deno.listen({ port: PORT })) {
|
||||
|
|
Loading…
Reference in a new issue