Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorEmptyPacket = errors.New("Packet length should be at least 1 byte") ErrorHttpStatusNotOk = errors.New("HTTP Status Not OK") )
Functions ¶
func EncodePacket ¶
func EncodePayloads ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) HandleOpen ¶
func (c *Client) HandleOpen(r OpenResponse) error
func (*Client) HandlePacket ¶
func (*Client) SendMessage ¶
type OpenResponse ¶
type Packet ¶
type Packet struct { Type PacketType Data string }
func ParsePacket ¶
func ParsePayloads ¶
type PacketType ¶
type PacketType int
const ( Open PacketType = iota Close Ping Pong Message Upgrade Noop )
func (PacketType) String ¶
func (pt PacketType) String() string
Click to show internal directories.
Click to hide internal directories.