Documentation ¶
Index ¶
- type WsBuilder
- func (b *WsBuilder) AutoReconnect() *WsBuilder
- func (b *WsBuilder) Build() *WsConn
- func (b *WsBuilder) Dump() *WsBuilder
- func (b *WsBuilder) ErrorHandleFunc(f func(err error)) *WsBuilder
- func (b *WsBuilder) MessageHandleFunc(f func([]byte) error) *WsBuilder
- func (b *WsBuilder) ReqHeader(key, value string) *WsBuilder
- func (b *WsBuilder) WsUrl(wsUrl string) *WsBuilder
- type WsConfig
- type WsConn
- func (ws *WsConn) Close()
- func (ws *WsConn) NewWs() *WsConn
- func (ws *WsConn) ReceiveMessage(msg []byte)
- func (ws *WsConn) SendCloseMessage(msg []byte)
- func (ws *WsConn) SendJsonMessage(m interface{}) error
- func (ws *WsConn) SendMessage(msg []byte)
- func (ws *WsConn) SendPingMessage(msg []byte)
- func (ws *WsConn) Subscribe(sub interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WsBuilder ¶
type WsBuilder struct {
// contains filtered or unexported fields
}
func NewWsBuilder ¶
func NewWsBuilder() *WsBuilder
func (*WsBuilder) AutoReconnect ¶
func (*WsBuilder) ErrorHandleFunc ¶
func (*WsBuilder) MessageHandleFunc ¶
type WsConn ¶
type WsConn struct { WsConfig // contains filtered or unexported fields }
func (*WsConn) ReceiveMessage ¶
func (*WsConn) SendCloseMessage ¶
func (*WsConn) SendJsonMessage ¶
func (*WsConn) SendMessage ¶
func (*WsConn) SendPingMessage ¶
Click to show internal directories.
Click to hide internal directories.