Versions in this module Expand all Collapse all v0 v0.1.3 May 11, 2015 Changes in this version + const ChatRspTypeErrRoomUnavailable type ChatRoom + func (r *ChatRoom) Name() string + func (r *ChatRoom) SetName(name string) v0.1.2 Apr 27, 2015 Changes in this version + type ChatManager struct + func ChatManagerNew(n int, mi int, cl *ChatLogger) *ChatManager + func (m *ChatManager) MaxIdle() int + func (m *ChatManager) MaxRooms() int + func (m *ChatManager) SetMaxIdle(mi int) + func (m *ChatManager) SetMaxRooms(mr int) v0.1.1 Apr 26, 2015 Changes in this version type ChatRoom + func (r *ChatRoom) ChatRoomStatsNew() *ChatRoomStats type Chatter + func (c *Chatter) ChatterStatsNew() *ChatterStats + func (c *Chatter) Nickname() string v0.1.0 Apr 24, 2015 Changes in this version + const ChatReqTypeGetNickname + const ChatReqTypeHide + const ChatReqTypeJoin + const ChatReqTypeLeave + const ChatReqTypeListNames + const ChatReqTypeListRooms + const ChatReqTypeMsg + const ChatReqTypeSetNickname + const ChatReqTypeUnhide + const ChatRspTypeErrAlreadyJoined + const ChatRspTypeErrHiddenNickname + const ChatRspTypeErrMaxRoomsReached + const ChatRspTypeErrNicknameMandatory + const ChatRspTypeErrNicknameUsed + const ChatRspTypeErrNotInRoom + const ChatRspTypeErrRoomMandatory + const ChatRspTypeErrUnknownReq + const ChatRspTypeGetNickname + const ChatRspTypeHide + const ChatRspTypeJoin + const ChatRspTypeLeave + const ChatRspTypeListNames + const ChatRspTypeListRooms + const ChatRspTypeMsg + const ChatRspTypeSetNickname + const ChatRspTypeUnhide + const DefaultHostname + const DefaultMaxConns + const DefaultMaxIdle + const DefaultMaxProcs + const DefaultMaxRooms + const DefaultPort + const DefaultProfPort + func PrintUsageAndExit() + func PrintVersionAndExit() + type ChatLogger struct + func ChatLoggerNew() *ChatLogger + func (l *ChatLogger) LogConnect(r *http.Request) + func (l *ChatLogger) LogError(addr string, msg string) + func (l *ChatLogger) LogSession(tp string, addr string, msg string) + type ChatRequest struct + Content string + ReqType int + RoomName string + Who *Chatter + func ChatRequestNew(c *Chatter, m string, rt int, n string) (*ChatRequest, error) + func (r *ChatRequest) String() string + type ChatResponse struct + Content string + List []string + RoomName string + RspType int + func ChatResponseNew(m string, rt int, c string, l []string) (*ChatResponse, error) + func (r *ChatResponse) String() string + type ChatRoom struct + func ChatRoomNew(n string, cl *ChatLogger, g *sync.WaitGroup) *ChatRoom + func (r *ChatRoom) Run() + type ChatRoomChatterStat struct + Nickname string + RemoteAddr string + type ChatRoomManager struct + func ChatRoomManagerNew(n int, cl *ChatLogger) *ChatRoomManager + type ChatRoomStats struct + Chatters []*ChatRoomChatterStat + LastReq time.Time + LastRsp time.Time + Name string + ReqCount uint64 + RspCount uint64 + Start time.Time + type Chatter struct + func ChatterNew(s *Server, c *websocket.Conn) *Chatter + func (c *Chatter) Run() + type ChatterStats struct + LastReq time.Time + LastRsp time.Time + Nickname string + RemoteAddr string + ReqCount uint64 + RspCount uint64 + Start time.Time + type Info struct + Debug bool + Hostname string + MaxConns int + MaxIdle int + MaxRooms int + Name string + Port int + ProfPort int + UUID string + Version string + func InfoNew(opts ...func(*Info)) *Info + func (i *Info) String() string + type Options struct + Debug bool + Hostname string + MaxConns int + MaxIdle int + MaxProcs int + MaxRooms int + Name string + Port int + ProfPort int + func (o *Options) String() string + type Server struct + func New(ops *Options) *Server + func (s *Server) Shutdown() + func (s *Server) Start() error + func (s *Server) StartProfiler() + type Stats struct + ChatterStats []*ChatterStats + ReqBytes int64 + ReqCount int64 + RoomStats []*ChatRoomStats + RouteStats map[string]map[string]int64 + Start time.Time + func StatsNew(opts ...func(*Stats)) *Stats + func (s *Stats) IncrReqStats(b int64) + func (s *Stats) IncrRouteStats(path string, rb int64) + func (s *Stats) String() string