Documentation ¶
Index ¶
Constants ¶
View Source
const ( PayloadTypeString = iota + 1 PayloadTypeBinary )
PayloadType enums
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Payload ¶
type Payload interface {
PayloadType() PayloadType
}
Payload is the body of a DataChannel message
type PayloadBinary ¶
type PayloadBinary struct {
Data []byte
}
PayloadBinary is a binary DataChannel message
func (PayloadBinary) PayloadType ¶
func (p PayloadBinary) PayloadType() PayloadType
PayloadType returns the type of payload
type PayloadString ¶
type PayloadString struct {
Data []byte
}
PayloadString is a string DataChannel message
func (PayloadString) PayloadType ¶
func (p PayloadString) PayloadType() PayloadType
PayloadType returns the type of payload
type PayloadType ¶
type PayloadType int
PayloadType are the different types of data that can be represented in a DataChannel message
func (PayloadType) String ¶
func (p PayloadType) String() string
Click to show internal directories.
Click to hide internal directories.