learning-go/room.go

17 lines
399 B
Go

package main
type room struct {
// forward is a channel that holds incoming mesages
// that should be forwared to the other clients
forward chan []byte
// join is a channel for clients wishing to join the room.
join chan *client
// leave is a channel for clients wishing to leave the room
leave chan *client
// clients holds all currents clients in this room
clients map[*client]bool
}