Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct { // CloseTimeout is the amount of time to wait after sending a closure status. CloseTimeout time.Duration // contains filtered or unexported fields }
Connection is a wrapper around a gorilla connection that conforms to websocket.Connection interface and can be used in gateways.
func New ¶
func New(conn *websocket.Conn) Connection
New creates a new Connection instance with a valid gorilla connection.
func (Connection) Close ¶
func (c Connection) Close() error
func (Connection) ReceiveMessage ¶
func (c Connection) ReceiveMessage() ([]byte, error)
func (Connection) SendClose ¶
func (c Connection) SendClose() error
func (Connection) SendMessage ¶
func (c Connection) SendMessage(data []byte) error
Click to show internal directories.
Click to hide internal directories.