socket

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2017 License: BSD-3-Clause Imports: 11 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DEBUG   string = "DEBUG"
	INFO    string = "INFO"
	WARNING string = "WARN"
	ERROR   string = "ERROR"
	FATAL   string = "FATAL"
)

Log levels

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server is the socket.io abstraction for Minimal Chat

func Create

func Create(ds *store.InMemory) (*Server, error)

func (Server) Listen

func (s Server) Listen()

Listen creates a new Server instance and begins listening for ws:// connections.

func (Server) ServeHTTP

func (s Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves the socket.io client script

type Socket

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

func (Socket) Listen

func (s Socket) Listen()

type SocketMessage

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

type SocketType

type SocketType string
const (
	OPERATOR SocketType = "operator"
	CLIENT   SocketType = "client"
)

Socket Type enum

Jump to

Keyboard shortcuts

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