mirror of
https://github.com/pion/webrtc.git
synced 2025-10-05 23:26:58 +08:00

Disabled gocylco for now, need to use gometalinter to disable conditionally. There are also a lot more linters we could use, but they cause too many issues to start today.
26 lines
515 B
Go
26 lines
515 B
Go
package datachannel
|
|
|
|
import (
|
|
"github.com/pkg/errors"
|
|
)
|
|
|
|
// 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 {
|
|
return errors.Errorf("Unimplemented")
|
|
}
|