Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidWsMessage is the error of an invalid websocket message ErrInvalidWsMessage = mustPrepareMessage("invalid websocket message") // ErrInternalError describes a server-side error ErrInternalError = mustPrepareMessage("internal server error") ErrTooManyInvalidMessages = mustPrepareMessage("too many invalid messages") )
View Source
var ErrInvalidMessageType = errors.New("invalid message type")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Hub *Hub
Conn *websocket.Conn
Received chan ClientRequest
Send chan *websocket.PreparedMessage
Closed chan struct{}
GoingAwayClose chan struct{}
InvalidCount int
// contains filtered or unexported fields
}
Client is a intermediate module to connect user-side websocket client with hub
type ClientRequest ¶
ClientRequest is the skeleton-unmarshalled client side request
Click to show internal directories.
Click to hide internal directories.