Documentation
¶
Index ¶
- Constants
- func Encode[T any](p BasePacket[T]) ([]byte, error)
- type BasePacket
- type Header
- type Packet
- func DecodePacket(data []byte) (Packet, error)
- func Discovery(requestId uuid.UUID, contentName string) Packet
- func Found(requestId uuid.UUID, contentName string, source string) Packet
- func Miss(requestId uuid.UUID, contentName string) Packet
- func Port(requestId uuid.UUID, contentName string, port string) Packet
- func Stream(requestId uuid.UUID, contentName string) Packet
- type PacketHeader
- type Payload
Constants ¶
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BasePacket ¶
type BasePacket[T any] struct { Header PacketHeader Payload T }
func Ok ¶
func Ok() BasePacket[string]
func Ping ¶
func Ping() BasePacket[string]
func Request ¶
func Request(contentName string) BasePacket[string]
func Stop ¶
func Stop(contentName string) BasePacket[string]
func Wake ¶
func Wake() BasePacket[string]
type Packet ¶
func DecodePacket ¶
type PacketHeader ¶
Click to show internal directories.
Click to hide internal directories.