update server
All checks were successful
Create and publish a Docker image 🚀 / build-and-push-image (push) Successful in 1m34s
All checks were successful
Create and publish a Docker image 🚀 / build-and-push-image (push) Successful in 1m34s
This commit is contained in:
7
main.go
7
main.go
@@ -19,9 +19,8 @@ func wsHandler(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
peer := NewPeer(conn)
|
||||
room.AddPeer(peer)
|
||||
log.Println("peer added", conn.LocalAddr().String())
|
||||
peer := NewPeer(conn, room)
|
||||
room.Add(peer)
|
||||
|
||||
go peer.ReadLoop()
|
||||
}
|
||||
@@ -29,6 +28,6 @@ func wsHandler(w http.ResponseWriter, r *http.Request) {
|
||||
func main() {
|
||||
http.HandleFunc("/ws", wsHandler)
|
||||
|
||||
log.Println("listening on :8080")
|
||||
log.Println("SFU listening on :8080")
|
||||
log.Fatal(http.ListenAndServe(":8080", nil))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user