mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 10:27:06 +00:00
add iris websocket client side for Go and a simple chat example
Former-commit-id: af1c555b6b092a3d0484fee2e200fd8767d7239e
This commit is contained in:
@@ -87,7 +87,7 @@ func SendMessage(serverID, to, method, message string) error {
|
||||
|
||||
// SendtBytes broadcast a message to server
|
||||
func SendtBytes(serverID, to, method string, message []byte) error {
|
||||
// look https://github.com/kataras/iris/blob/master/websocket/message.go , client.go and client.js
|
||||
// look https://github.com/kataras/iris/blob/master/websocket/message.go , client.js.go and client.js
|
||||
// to understand the buffer line:
|
||||
buffer := []byte(fmt.Sprintf("%s%v;0;%v;%v;", websocket.DefaultEvtMessageKey, method, serverID, to))
|
||||
buffer = append(buffer, message...)
|
||||
|
||||
Reference in New Issue
Block a user