18 lines
307 B
Go
18 lines
307 B
Go
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
|
|
}
|