Documentation
¶
Index ¶
- type Ws
- func (w *Ws) AppendCertsFromPem(pemCerts []byte) bool
- func (w *Ws) Close() error
- func (w *Ws) Connect() error
- func (w *Ws) Read() (int, []byte, error)
- func (w *Ws) ReadJSON(v interface{}) error
- func (w *Ws) Reconnect(b bool)
- func (w *Ws) SetCloseHandler(f func(int, string) error)
- func (w *Ws) SetInitMsg(msg []byte)
- func (w *Ws) SetSecure(b bool)
- func (w *Ws) SetUrl(scheme, host, path string)
- func (w *Ws) Version() string
- func (w *Ws) WriteJSON(v interface{}) error
- func (w *Ws) WriteMessage(messageType int, data []byte) error
- func (w *Ws) WriteQueue(c chan []byte, e chan error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ws ¶
type Ws struct {
// contains filtered or unexported fields
}
var Websocket Ws
Websocket exported as symbol named "Websocket"
func (*Ws) AppendCertsFromPem ¶
AppendCertsFromPem add a certificate to the certificate pool
func (*Ws) SetCloseHandler ¶
SetCloseHandler set a close handler to call when a connection ends
func (*Ws) SetInitMsg ¶
SetInitMsg set a message to be send when a connection is established
func (*Ws) WriteMessage ¶
WriteMessage write a message
func (*Ws) WriteQueue ¶
WriteQueue requires a channel te read message from and a channel to send errors to if wil requeue failed messages until the queue is filled, then it will throw them away todo create a way to remove old message when the queue is filling up so that there is space for new message
Click to show internal directories.
Click to hide internal directories.