Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RequireLogin ¶
func RequireLogin(rw http.ResponseWriter, req *http.Request, db *mgo.Database, s sessions.Session, r render.Render)
middleware!
func StartServer ¶
func StartServer()
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
holds all the info an client needs.
func (*Client) ListenToAll ¶
func (c *Client) ListenToAll()
type MessageStruct ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) BroadCast ¶
func (s *Server) BroadCast() chan<- *MessageStruct
channel to broadcast the messages to all clients.
func (*Server) Messages ¶
func (s *Server) Messages() []*MessageStruct
holds all the messages from clients.
func (*Server) RemoveClient ¶
channel to remove a client from the chat.
Click to show internal directories.
Click to hide internal directories.