Files
webrtc/internal/datachannel/message_channel_ack.go
Sean DuBois 13b02984e3 Fix all linting errors
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.
2018-07-21 12:27:38 -07:00

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")
}