comments
--HG-- branch : adc
This commit is contained in:
parent
2fa40642a9
commit
0e8d76ef2f
@ -89,7 +89,7 @@ func (this *HubConnection) userJoined_Full(uinf *UserInfo) {
|
||||
}
|
||||
|
||||
// SayRaw sends raw bytes over the TCP socket. Callers should add the protocol
|
||||
// terminating character `|` themselves.
|
||||
// terminating character themselves (e.g. `|` for NMDC).
|
||||
// Note that protocol messages are transmitted on the caller thread, not from
|
||||
// any internal libnmdc thread.
|
||||
func (this *HubConnection) SayRaw(protocolCommand string) error {
|
||||
@ -185,9 +185,12 @@ func (this *HubConnection) worker() {
|
||||
|
||||
// Attempt to parse a message block
|
||||
for len(fullBuffer) > 0 {
|
||||
|
||||
// FIXME nmdc
|
||||
for len(fullBuffer) > 0 && fullBuffer[0] == '|' {
|
||||
fullBuffer = fullBuffer[1:]
|
||||
}
|
||||
|
||||
protocolMessage := rxProtocolMessage.FindString(fullBuffer)
|
||||
if len(protocolMessage) > 0 {
|
||||
this.proto.ProcessCommand(protocolMessage[:len(protocolMessage)-1])
|
||||
|
Loading…
Reference in New Issue
Block a user