Documentation
¶
Overview ¶
Package ws implements websocket server and protocol.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
Conn thread safe wrapper for websocket.Conn.
func (*Conn) WriteProtobuf ¶
func (c *Conn) WriteProtobuf(message protoreflect.ProtoMessage) error
WriteProtobuf writes protobuf message to the websocket.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a websocket server.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session keeps the information about client subscriptions and handles data update routing.
func NewSession ¶
NewSession creates a new session.
type Subscription ¶
type Subscription struct {
// ID should be an unique subscription id.
// Message routing is using this ID to sync server and client sides.
ID string
// contains filtered or unexported fields
}
Subscription is a reactive list of items that sends updates to the websocket on each state change.
Click to show internal directories.
Click to hide internal directories.