TerraOceanPlugin/GoBot/server/hub.go

18 lines
307 B
Go

2019-10-12 14:07:40 +07:00
package server
import "github.com/gorilla/websocket"
var clients = make(map[*websocket.Conn]bool)
func newSession(who *websocket.Conn) {
clients[who] = true
}
func disconnectSession(who *websocket.Conn) {
delete(clients, who)
}
func handleIncomingMessage(who *websocket.Conn, msg string) {
//TODO
}