split HandleSentMessage into text and binary methods

This commit is contained in:
Ola Holmström
2017-02-10 23:53:55 +01:00
3 changed files with 30 additions and 9 deletions
+7
View File
@@ -91,6 +91,13 @@ loop:
break loop
}
if msg.t == websocket.TextMessage {
s.melody.messageSentHandler(s, msg.msg)
}
if msg.t == websocket.BinaryMessage {
s.melody.messageSentHandlerBinary(s, msg.msg)
}
case <-ticker.C:
s.ping()
}