add some function comments

This commit is contained in:
mappu 2016-11-29 19:49:53 +13:00
parent 95311e1479
commit 732622f4db
1 changed files with 3 additions and 0 deletions

View File

@ -30,6 +30,7 @@ type HubConnection struct {
autoReconnect bool
}
// Thread-safe user accessor.
func (this *HubConnection) Users(cb func(*map[string]UserInfo) error) error {
this.userLock.Lock()
defer this.userLock.Unlock()
@ -88,6 +89,8 @@ func (this *HubConnection) userJoined_Full(uinf *UserInfo) {
}
}
// SayRaw sends raw bytes over the TCP socket. Callers should add the protocol
// terminating character `|` themselves.
// Note that protocol messages are transmitted on the caller thread, not from
// any internal libnmdc thread.
func (this *HubConnection) SayRaw(protocolCommand string) error {