From 732622f4db8477cf9e43944292c9b8dd86589b1f Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 29 Nov 2016 19:49:53 +1300 Subject: [PATCH] add some function comments --- HubConnection.go | 3 +++ 1 file changed, 3 insertions(+) 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 {