signaling

package
v0.0.0-...-78f5a99 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Treatments = []string{"mc-signaling-usewebsockets", "mc-signaling-useturn"}

Functions

This section is empty.

Types

type Conn

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

func (*Conn) Credentials

func (c *Conn) Credentials() (*nethernet.Credentials, error)

func (*Conn) ReadSignal

func (c *Conn) ReadSignal() (*nethernet.Signal, error)

func (*Conn) WriteSignal

func (c *Conn) WriteSignal(s *nethernet.Signal) error

type Dialer

type Dialer struct {
	Options *websocket.DialOptions
	Logger  *slog.Logger

	NetworkID uint64
}

func (*Dialer) DialContext

func (d *Dialer) DialContext(ctx context.Context, src franchise.TokenConfigSource, env Environment) (*Conn, error)

type Environment

type Environment struct {
	ServiceURI string `json:"serviceUri,omitempty"`
	StunURI    string `json:"stunUri,omitempty"`
	TurnURI    string `json:"turnUri,omitempty"`
}

type Message

type Message struct {
	Type MessageType `json:"Type"`
	To   json.Number `json:"To,omitempty"`
	From string      `json:"From,omitempty"`
	Data string      `json:"Message,omitempty"`
}

type MessageType

type MessageType uint32
const (
	MessageTypePing MessageType = iota
	MessageTypeSignal
	MessageTypeCredentials
)

Jump to

Keyboard shortcuts

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