mirror of
https://github.com/0ceanSlim/grain.git
synced 2024-11-22 08:37:13 +00:00
handler renamed listener
This commit is contained in:
parent
2b0186e499
commit
47dcc0bf4d
2
main.go
2
main.go
@ -27,7 +27,7 @@ func main() {
|
|||||||
defer db.DisconnectDB()
|
defer db.DisconnectDB()
|
||||||
|
|
||||||
// Start WebSocket server
|
// Start WebSocket server
|
||||||
http.Handle("/", websocket.Handler(server.Handler))
|
http.Handle("/", websocket.Handler(server.Listener))
|
||||||
fmt.Println("WebSocket server started on", config.Server.Address)
|
fmt.Println("WebSocket server started on", config.Server.Address)
|
||||||
err = http.ListenAndServe(config.Server.Address, nil)
|
err = http.ListenAndServe(config.Server.Address, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -14,7 +14,7 @@ import (
|
|||||||
|
|
||||||
var subscriptions = make(map[string]server.Subscription)
|
var subscriptions = make(map[string]server.Subscription)
|
||||||
|
|
||||||
func Handler(ws *websocket.Conn) {
|
func Listener(ws *websocket.Conn) {
|
||||||
defer ws.Close()
|
defer ws.Close()
|
||||||
|
|
||||||
var msg string
|
var msg string
|
Loading…
Reference in New Issue
Block a user