server

package
v0.0.0-...-e90627c Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const MessageTypeAnnounce = "announce"
View Source
const MessageTypePing = "ping"
View Source
const MessageTypePong = "pong"
View Source
const MessageTypePublish = "publish"
View Source
const MessageTypeSubscribe = "subscribe"
View Source
const MessageTypeUnsubscribe = "unsubscribe"

Variables

This section is empty.

Functions

func RunServer

func RunServer(addr string) (err error, serv *http.Server)

Types

type Message

type Message struct {
	Type   string      `json:"type"`
	Topics []string    `json:"topics"`
	Topic  string      `json:"topic"`
	Data   interface{} `json:"data"`
}

type SignalingServer

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

func NewSignalingServer

func NewSignalingServer() *SignalingServer

func (*SignalingServer) HandleNewConnection

func (ss *SignalingServer) HandleNewConnection(conn *websocket.Conn)

func (*SignalingServer) ServeHTTP

func (ss *SignalingServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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