Documentation
¶
Index ¶
- func BuildProxy(Url string) func(*http.Request) (*url.URL, error)
- type ConnectionOptions
- type Empty
- type ReconnectionOptions
- type Socket
- func (socket *Socket) Close()
- func (socket *Socket) Connect()
- func (socket *Socket) DoConnect() (err error)
- func (socket Socket) EnableLogging()
- func (socket Socket) GetLogger() logging.Logger
- func (socket *Socket) Reconnect() (err error)
- func (socket *Socket) SendBinary(data []byte) error
- func (socket *Socket) SendText(message string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConnectionOptions ¶
type ReconnectionOptions ¶
todo Yet to be done
type Socket ¶
type Socket struct {
Conn *websocket.Conn
WebsocketDialer *websocket.Dialer
Url string
ConnectionOptions ConnectionOptions
ReconnectionOptions ReconnectionOptions
RequestHeader http.Header
OnConnected func(socket Socket)
OnTextMessage func(message string, socket Socket)
OnBinaryMessage func(data []byte, socket Socket)
OnConnectError func(err error, socket Socket)
OnDisconnected func(err error, socket Socket)
OnPingReceived func(data string, socket Socket)
OnPongReceived func(data string, socket Socket)
IsConnected bool
Timeout time.Duration
// contains filtered or unexported fields
}
func (Socket) EnableLogging ¶
func (socket Socket) EnableLogging()
func (*Socket) SendBinary ¶
Click to show internal directories.
Click to hide internal directories.