Documentation ¶
Index ¶
- Variables
- func Dialer(dialer gobwas.Dialer) wolfsocket.Dialer
- func Upgrader(upgrader gobwas.HTTPUpgrader) neffos.Upgrader
- type Header
- type Options
- type Socket
- func (s *Socket) NetConn() net.Conn
- func (s *Socket) ReadData(timeout time.Duration) ([]byte, neffos.MessageType, error)
- func (s *Socket) Request() *http.Request
- func (s *Socket) WriteBinary(body []byte, timeout time.Duration) error
- func (s *Socket) WriteText(body []byte, timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
var DefaultDialer = Dialer(gobwas.DefaultDialer)
DefaultDialer is a gobwas/ws dialer with all fields set to the default values.
var DefaultUpgrader = Upgrader(gobwas.HTTPUpgrader{})
DefaultUpgrader is a gobwas/ws HTTP Upgrader with all fields set to the default values.
Functions ¶
func Dialer ¶
func Dialer(dialer gobwas.Dialer) wolfsocket.Dialer
Dialer is a `neffos.Dialer` type for the gobwas/ws subprotocol implementation. Should be used on `Dial` to create a new client/client-side connection. To send headers to the server set the dialer's `Header` field to a `gobwas.HandshakeHeaderHTTP`.
Types ¶
type Header ¶
type Header = gobwas.HandshakeHeaderHTTP
Header is an alias to the adapter that allows the use of `http.Header` as `gobwas/ws.Dialer.HandshakeHeader`.
type Socket ¶
Socket completes the `neffos.Socket` interface, it describes the underline websocket connection.
func (*Socket) WriteBinary ¶
WriteBinary sends a binary message to the remote connection.