Documentation ¶
Overview ¶
Websocket server package. This package starts separate websocket server and transfers all messages from redis channel "ws" to client browser.
Running server
web_socket.StartServer()
Example code to send data to redis:
c, _ := redis.Dial("tcp", ":6379") msg := web_socket.RedisMessage{"apiKey", map[string]interface{}{ "log_per_second": 24, "kbs_per_second": 128, }} msg.Send(c)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartServer ¶
func StartServer()
Types ¶
type RedisMessage ¶
type RedisMessage struct { ApiKey string Data interface{} }
Represents data to be sent to user by its apiKey
Click to show internal directories.
Click to hide internal directories.