rolldcomm

package
v0.0.0-...-e510184 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 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 CommSession

type CommSession struct {
	ID          string
	Connections map[string]*ConnectionInfo
	Commands    chan string
	// contains filtered or unexported fields
}

CommSession is all of the information about a Session

func NewCommSession

func NewCommSession(id string) *CommSession

NewCommSession create a CommSession object that encapsulates all of the information that is unique to and required for a Session.

func (CommSession) AddConnection

func (session CommSession) AddConnection(id string, name string, w http.ResponseWriter, r *http.Request)

AddConnection adds a participant information to the Session's CommSession once they are ready to switch to WebSockets and begin communication.

type ConnectionInfo

type ConnectionInfo struct {
	ID         string
	Name       string
	Connection *websocket.Conn
}

ConnectionInfo comprises information about an individual participant in a Session

Jump to

Keyboard shortcuts

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