websocket

package
v0.0.0-...-ee3c536 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is our handler for client socket connection

func NewClient

func NewClient(hub *Hub, socket *websocket.Conn) *Client

NewClient is our constructor that returns an instance of Client

type Hub

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

Hub is our handler that represents a Hub

func NewHub

func NewHub() *Hub

NewHub is our constructor that returns an instance of Hub

func (*Hub) HandleWebsocket

func (hub *Hub) HandleWebsocket(w http.ResponseWriter, r *http.Request)

HandleWebsocket handles websocket connection

func (*Hub) Run

func (hub *Hub) Run()

Run runs the websocket server

Jump to

Keyboard shortcuts

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