websocket

package
v0.0.0-...-537bcc9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2015 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetWS

func GetWS(c *gin.Context)

Get websocket

func Notify

func Notify(groupId string, value *map[string]interface{})

Broadcasts the value to all client registred to the group

Types

type AppClient

type AppClient struct {
	Clients map[*websocket.Conn]*Client
}

func (*AppClient) Register

func (appClient *AppClient) Register(conn *websocket.Conn)

Registers the connection from to the intools engine

type Client

type Client struct {
	Socket   *websocket.Conn
	GroupIds []string
}

type Message

type Message struct {
	Command string                 `json:"Command"`
	Data    map[string]interface{} `json:"data"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL