dispatcher

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateConnection

func CreateConnection(
	id string,
	appID string,
	name string,
	protocol string,
	wsConnection *websocket.Conn,
	conn *config.Config,
	d *Dispatcher,
	support map[string]bool,
) *connection

CreateConnection establishes a new websocket connection

Types

type Dispatcher

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

Dispatcher type

func Create

func Create(config *config.Config, store *auth.Store) *Dispatcher

Create returns a new instance of the Dispatcher

func (*Dispatcher) Dispatch

func (d *Dispatcher) Dispatch(
	msg *message.Message,
	sender *connection,
)

Dispatch sends messages to listening clients

func (*Dispatcher) ProcessMessage

func (d *Dispatcher) ProcessMessage(
	msg *message.Message,
	sender *connection,
)

ProcessMessage is parsing and routing the messages to the correct functions

func (*Dispatcher) Serve

func (d *Dispatcher) Serve()

Serve listens for incomming connections and messages

Jump to

Keyboard shortcuts

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