ws

package
Version: v0.0.0-...-d9b87a0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Socket

type Socket struct {
	// contains filtered or unexported fields
}

func NewSocket

func NewSocket(underConn *gorilla.Conn, request *http.Request) *Socket

func (*Socket) Close

func (s *Socket) Close() error

func (*Socket) ReadData

func (s *Socket) ReadData(timeout time.Duration) ([]byte, int, error)

ReadData reads binary or text messages from the remote connection.

func (*Socket) Request

func (s *Socket) Request() *http.Request

Request returns the http request value.

func (*Socket) WriteBinary

func (s *Socket) WriteBinary(body []byte, timeout time.Duration) error

WriteBinary sends a binary message to the remote connection.

func (*Socket) WriteClose

func (s *Socket) WriteClose(timeout time.Duration) error

func (*Socket) WritePing

func (s *Socket) WritePing(body []byte, timeout time.Duration) error

func (*Socket) WritePong

func (s *Socket) WritePong(body []byte, timeout time.Duration) error

func (*Socket) WriteText

func (s *Socket) WriteText(body []byte, timeout time.Duration) error

WriteText sends a text message to the remote connection.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL