mirror of
https://github.com/unitoftime/rtcnet.git
synced 2025-09-26 20:31:17 +08:00
Made listener implement net.Listener
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -3,7 +3,6 @@
|
||||
package rtcnet
|
||||
|
||||
import (
|
||||
"time"
|
||||
"context"
|
||||
"crypto/tls"
|
||||
|
||||
|
Reference in New Issue
Block a user