gowebsocket

package module
v0.0.0-...-1738ae3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2015 License: BSD-3-Clause Imports: 7 Imported by: 0

README

gowebsocket

Websocket server in Golang.

Build Status


Status: Started.

Usage

go run examples/example.go

License

BSD 3-Clause: LICENSE.txt

LICENSE

Documentation

Overview

Package gowebsocket is a websocket library. Currently functional api - will improve and add OO alternative.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomHandler

type CustomHandler func([]byte, func(string))

CustomHandler is an alias.

type SocketHandler

type SocketHandler func(*websocket.Conn)

SocketHandler is an alias.

type WebServer

type WebServer struct{}

WebServer is a simple html server, useful for serving a websocket client.

func NewWebServer

func NewWebServer() *WebServer

NewWebServer returns a new WebServer.

type WebsocketServer

type WebsocketServer struct{}

WebsocketServer is the main struct representing the websocket server.

func NewWebsocketServer

func NewWebsocketServer() *WebsocketServer

NewWebsocketServer returns a new WebsocketServer.

func (*WebsocketServer) Add

func (s *WebsocketServer) Add(route string, handlerFn CustomHandler)

Add adds a route and an associated handler function.

func (*WebsocketServer) Start

func (s *WebsocketServer) Start()

Start starts the server listening for the specified routes.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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