From 3af1a5a63164e0a693e2b20d66d6a3fb78e87cbe Mon Sep 17 00:00:00 2001 From: Jacob Stewart <2606873+unitoftime@users.noreply.github.com> Date: Thu, 20 Apr 2023 08:16:16 -0400 Subject: [PATCH] Made listener implement net.Listener --- README.md | 4 ++-- listener.go | 2 +- ws_wasm.go | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3387c2f..d2871c9 100644 --- a/README.md +++ b/README.md @@ -20,13 +20,13 @@ I've tested this on: # Usage ``` - import "github.com/unitoftime/rtcnet" +import "github.com/unitoftime/rtcnet" ``` See [Example](https://github.com/unitoftime/rtcnet/tree/master/example) # Used By -1. I'm currently using this for an online game I'm building for browser. [You can find it here](www.unit.dev/mmo) +1. I'm currently using this for an online game I'm building for browser. [You can find it here](https://www.unit.dev/mmo) # License 1. MIT diff --git a/listener.go b/listener.go index 6f6e8c6..9f00b4b 100644 --- a/listener.go +++ b/listener.go @@ -55,7 +55,7 @@ func NewListener(address string, config ListenConfig) (*Listener, error) { return rtcListener, nil } -func (l *Listener) Accept() (*Conn, error) { +func (l *Listener) Accept() (net.Conn, error) { select{ case conn := <-l.pendingAccepts: return conn, nil diff --git a/ws_wasm.go b/ws_wasm.go index c318472..352d64e 100644 --- a/ws_wasm.go +++ b/ws_wasm.go @@ -3,7 +3,6 @@ package rtcnet import ( - "time" "context" "crypto/tls"