websocket

package
v0.0.0-...-3c3391d Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2017 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 ...

func (*Client) Read

func (c *Client) Read() (string, error)

func (*Client) Write

func (c *Client) Write(data string)

type EventHandler

type EventHandler interface {
	Connect(client *Client)
	Disconnect(client *Client)
	Message(client *Client, msg string)
}

EventHandler ...

type PureEventHandler

type PureEventHandler struct {
}

PureEventHandler ...

func (*PureEventHandler) Connect

func (peh *PureEventHandler) Connect(client *Client)

Connect ..

func (*PureEventHandler) Disconnect

func (peh *PureEventHandler) Disconnect(client *Client)

Disconnect ..

func (*PureEventHandler) Message

func (peh *PureEventHandler) Message(client *Client, msg string)

Message ...

type WebSocket

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

WebSocket ...

func NewWebSocket

func NewWebSocket(handler EventHandler) *WebSocket

NewWebSocket ...

func (*WebSocket) RegisterMiddleware

func (w *WebSocket) RegisterMiddleware(hs handshake)

RegisterMiddleware ...

func (*WebSocket) Run

func (w *WebSocket) Run(port int)

Run ...

Jump to

Keyboard shortcuts

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