All Downloads are FREE. Search and download functionalities are using the official Maven repository.

vendor.github.com.pion.datachannel.message_channel_ack.go Maven / Gradle / Ivy

There is a newer version: 2.9.1
Show newest version
package datachannel

// channelAck is used to ACK a DataChannel open
type channelAck struct{}

const (
	channelOpenAckLength = 4
)

// Marshal returns raw bytes for the given message
func (c *channelAck) Marshal() ([]byte, error) {
	raw := make([]byte, channelOpenAckLength)
	raw[0] = uint8(dataChannelAck)

	return raw, nil
}

// Unmarshal populates the struct with the given raw data
func (c *channelAck) Unmarshal(raw []byte) error {
	// Message type already checked in Parse and there is no further data
	return nil
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy