message

package
v0.0.0-...-4c68550 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(channelMsg *ChannelMsg) ([]byte, error)

func MuteMarshal

func MuteMarshal(muteObj *Mute) ([]byte, error)

func SdpMarshal

func SdpMarshal(sdpObj *Sdp) ([]byte, error)

Types

type ChannelMsg

type ChannelMsg struct {
	Id   uint32      `json:"id"`
	Data interface{} `json:"data"`
	Type MsgType     `json:"type"`
}

func Unmarshal

func Unmarshal(rawChannelMsg []byte) (*ChannelMsg, error)

type MsgType

type MsgType int
const (
	OfferMsg MsgType = iota + 1
	AnswerMsg
	MuteMsg
)

type Mute

type Mute struct {
	Mid  string `json:"mid"`
	Mute bool   `json:"mute"`
}

func MuteUnmarshal

func MuteUnmarshal(data []byte) (*Mute, error)

type Sdp

type Sdp struct {
	Number uint32                     `json:"number"`
	SDP    *webrtc.SessionDescription `json:"sdp"`
}

func SdpUnmarshal

func SdpUnmarshal(sdpData []byte) (*Sdp, error)

Jump to

Keyboard shortcuts

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