1
0
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:
Gerasimos (Makis) Maropoulos
2019-02-09 04:28:00 +02:00
parent d30f17eb3f
commit 280872fd59
9 changed files with 536 additions and 226 deletions

View File

@@ -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...)