ws_handler

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2016 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConnection

func NewConnection(ws *websocket.Conn, uid string, hub *Hub) *connection

NewConnection return new connection object.

func NewWsController

func NewWsController(hub *Hub) *wsController

NewWsController return new wsController object.

Types

type Hub

type Hub struct {
	// contains filtered or unexported fields
}

func NewHub

func NewHub(db *sqlx.DB) *Hub

NewHub return new Hub object.

func (*Hub) Run

func (h *Hub) Run()

Run Hub's main method.

type WSMessage

type WSMessage struct {
	Action string `json:"action"`
	Topic  string `json:"topic"`
	Data   string `json:"data"`
}

Jump to

Keyboard shortcuts

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