Documentation
¶
Index ¶
- type ConcurrentWebSocket
- func (ws *ConcurrentWebSocket) Close() error
- func (ws *ConcurrentWebSocket) ReadJSON(inboundMsg interface{}) error
- func (ws *ConcurrentWebSocket) ReadMessage() (messageType int, p []byte, err error)
- func (ws *ConcurrentWebSocket) SetWritesBeforeClose(n int)
- func (ws *ConcurrentWebSocket) WriteError(title string, err error)
- func (ws *ConcurrentWebSocket) WriteJSON(jsonOutboundMsg interface{}) error
- func (ws *ConcurrentWebSocket) WriteMessage(messageType int, data []byte) error
- func (ws *ConcurrentWebSocket) WriteNonFinalJSON(jsonOutboundMsg interface{}) error
- type Conn
- type WebSocketCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConcurrentWebSocket ¶
type ConcurrentWebSocket struct {
// contains filtered or unexported fields
}
func NewConcurrentWebSocket ¶
func NewConcurrentWebSocket(conn Conn, log *logger.Logger) *ConcurrentWebSocket
func (*ConcurrentWebSocket) Close ¶
func (ws *ConcurrentWebSocket) Close() error
func (*ConcurrentWebSocket) ReadJSON ¶
func (ws *ConcurrentWebSocket) ReadJSON(inboundMsg interface{}) error
func (*ConcurrentWebSocket) ReadMessage ¶
func (ws *ConcurrentWebSocket) ReadMessage() (messageType int, p []byte, err error)
func (*ConcurrentWebSocket) SetWritesBeforeClose ¶
func (ws *ConcurrentWebSocket) SetWritesBeforeClose(n int)
func (*ConcurrentWebSocket) WriteError ¶
func (ws *ConcurrentWebSocket) WriteError(title string, err error)
func (*ConcurrentWebSocket) WriteJSON ¶
func (ws *ConcurrentWebSocket) WriteJSON(jsonOutboundMsg interface{}) error
WriteJSON write json message to websocket, counting towards writes before close
func (*ConcurrentWebSocket) WriteMessage ¶
func (ws *ConcurrentWebSocket) WriteMessage(messageType int, data []byte) error
func (*ConcurrentWebSocket) WriteNonFinalJSON ¶
func (ws *ConcurrentWebSocket) WriteNonFinalJSON(jsonOutboundMsg interface{}) error
WriteNonFinalJSON write json message to websocket, not counting towards writes before close
type WebSocketCache ¶
type WebSocketCache struct {
// contains filtered or unexported fields
}
func NewWebSocketCache ¶
func NewWebSocketCache() WebSocketCache
func (*WebSocketCache) CloseConnections ¶
func (c *WebSocketCache) CloseConnections() error
func (*WebSocketCache) Delete ¶
func (c *WebSocketCache) Delete(key string)
func (*WebSocketCache) Get ¶
func (c *WebSocketCache) Get(key string) *ConcurrentWebSocket
func (*WebSocketCache) Set ¶
func (c *WebSocketCache) Set(key string, ws *ConcurrentWebSocket)
Click to show internal directories.
Click to hide internal directories.