Documentation ¶
Index ¶
- func Decode(data []byte) (uint32, message.PacketType, protocol.PeerID, []byte, error)
- func Encode(typ message.PacketType, cipher noise.Cipher, peerID protocol.PeerID, ...) []byte
- func EncodeMessage(typ message.PacketType, cipher noise.Cipher, peerID protocol.PeerID, ...) ([]byte, error)
- type RawPacket
- type RelayCodec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RelayCodec ¶
type RelayCodec struct {
// contains filtered or unexported fields
}
func NewCodec ¶
func NewCodec() *RelayCodec
func (*RelayCodec) Decode ¶
func (c *RelayCodec) Decode(input []byte) ([]RawPacket, error)
Decode decodes the protobuf message into MERP command.
func (*RelayCodec) Encode ¶
func (c *RelayCodec) Encode(nonce uint32, typ message.PacketType, data []byte) ([]byte, error)
Encode encodes the protobuf message in relay command form into bytes.
Click to show internal directories.
Click to hide internal directories.