Documentation
¶
Index ¶
- func NewWebSocketServer(port int, sessionsStorage sessionstorage.SessionStorage) server.Server
- func NewWebSocketSession(conn *websocket.Conn, peer *domain.Peer, incoming bool, lastDial time.Time) session.Session
- type WebSocketServer
- type WebSocketSession
- func (s *WebSocketSession) Close(ctx context.Context)
- func (s *WebSocketSession) GetID() uuid.UUID
- func (s *WebSocketSession) GetReadChannel(context.Context) (chan *pb.Message, error)
- func (s *WebSocketSession) GetWriteChannel(context.Context) (chan *pb.Message, error)
- func (s *WebSocketSession) IsIncoming() bool
- func (s *WebSocketSession) IsOpen() bool
- func (s *WebSocketSession) Read(ctx context.Context)
- func (s *WebSocketSession) Write(ctx context.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWebSocketServer ¶
func NewWebSocketServer(port int, sessionsStorage sessionstorage.SessionStorage) server.Server
Types ¶
type WebSocketServer ¶
type WebSocketServer struct {
// contains filtered or unexported fields
}
func (*WebSocketServer) Serve ¶
func (s *WebSocketServer) Serve() error
func (*WebSocketServer) Stop ¶
func (s *WebSocketServer) Stop(ctx context.Context)
type WebSocketSession ¶
type WebSocketSession struct {
session.BaseSession
// contains filtered or unexported fields
}
func (*WebSocketSession) Close ¶
func (s *WebSocketSession) Close(ctx context.Context)
func (*WebSocketSession) GetID ¶
func (s *WebSocketSession) GetID() uuid.UUID
func (*WebSocketSession) GetReadChannel ¶
func (*WebSocketSession) GetWriteChannel ¶
func (*WebSocketSession) IsIncoming ¶
func (s *WebSocketSession) IsIncoming() bool
func (*WebSocketSession) IsOpen ¶
func (s *WebSocketSession) IsOpen() bool
func (*WebSocketSession) Read ¶
func (s *WebSocketSession) Read(ctx context.Context)
func (*WebSocketSession) Write ¶
func (s *WebSocketSession) Write(ctx context.Context)
Click to show internal directories.
Click to hide internal directories.