ws

package module
v0.0.0-...-11b31a1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2013 License: MIT Imports: 6 Imported by: 0

README

WebSocket broadcaster for straumur

Build Status

Websocket broadcaster for straumur

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
}

Represents a connected websocket client

func NewClient

func NewClient(ws *websocket.Conn, server *Server) *Client

func (*Client) Conn

func (c *Client) Conn() *websocket.Conn

func (*Client) Done

func (c *Client) Done()

func (*Client) Listen

func (c *Client) Listen()

func (*Client) Write

func (c *Client) Write(e *straumur.Event)

type Server

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

func NewServer

func NewServer(pattern string) *Server

Create a new Websocket broadcaster

func (*Server) Add

func (s *Server) Add(c *Client)

func (*Server) Broadcast

func (s *Server) Broadcast(e *straumur.Event)

func (*Server) Del

func (s *Server) Del(c *Client)

func (*Server) Done

func (s *Server) Done()

func (*Server) Err

func (s *Server) Err(err error)

func (*Server) Run

func (s *Server) Run(ec chan error)

Jump to

Keyboard shortcuts

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