ws

package
v0.0.0-...-539d32a Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL