diff --git a/HubConnection.go b/HubConnection.go index e6aea15..dec9ab0 100644 --- a/HubConnection.go +++ b/HubConnection.go @@ -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 {