Documentation ¶
Index ¶
- Constants
- Variables
- type MessageHandler
- type SocketAdapter
- type StreamMessageType
- type WebSocketAdapter
- func (s *WebSocketAdapter) Close() error
- func (s *WebSocketAdapter) GetCommandSerializationType() commands.SerializationType
- func (s *WebSocketAdapter) GetTLSConnectionState() (tls.ConnectionState, bool)
- func (s *WebSocketAdapter) IsClient() bool
- func (s *WebSocketAdapter) IsServer() bool
- func (s *WebSocketAdapter) LocalAddr() net.Addr
- func (s *WebSocketAdapter) MaxDataPayloadLen() uint16
- func (s *WebSocketAdapter) Name() string
- func (s *WebSocketAdapter) RefreshFeatures()
- func (s *WebSocketAdapter) RemoteAddr() net.Addr
- func (s *WebSocketAdapter) Serve() (bool, error)
- func (s *WebSocketAdapter) SetControlMessageHandler(handler MessageHandler)
- func (s *WebSocketAdapter) SetDataMessageHandler(handler MessageHandler)
- func (s *WebSocketAdapter) SetFeaturesContainer(featuresContainer features.Container)
- func (s *WebSocketAdapter) SetPongHandler(handler func())
- func (s *WebSocketAdapter) WaitReady()
- func (s *WebSocketAdapter) WriteControlMessage(message []byte) error
- func (s *WebSocketAdapter) WriteDataMessage(message []byte) error
- func (s *WebSocketAdapter) WritePingMessage() error
- type WebTransportAdapter
- func (s *WebTransportAdapter) Close() error
- func (s *WebTransportAdapter) GetCommandSerializationType() commands.SerializationType
- func (s *WebTransportAdapter) GetTLSConnectionState() (tls.ConnectionState, bool)
- func (s *WebTransportAdapter) IsClient() bool
- func (s *WebTransportAdapter) IsServer() bool
- func (s *WebTransportAdapter) LocalAddr() net.Addr
- func (s *WebTransportAdapter) MaxDataPayloadLen() uint16
- func (s *WebTransportAdapter) Name() string
- func (s *WebTransportAdapter) RefreshFeatures()
- func (s *WebTransportAdapter) RemoteAddr() net.Addr
- func (s *WebTransportAdapter) Serve() (bool, error)
- func (s *WebTransportAdapter) SetControlMessageHandler(handler MessageHandler)
- func (s *WebTransportAdapter) SetDataMessageHandler(handler MessageHandler)
- func (s *WebTransportAdapter) SetFeaturesContainer(featuresContainer features.Container)
- func (s *WebTransportAdapter) SetPongHandler(handler func())
- func (s *WebTransportAdapter) WaitReady()
- func (s *WebTransportAdapter) WriteControlMessage(message []byte) error
- func (s *WebTransportAdapter) WriteDataMessage(message []byte) error
- func (s *WebTransportAdapter) WritePingMessage() error
Constants ¶
View Source
const ErrorCodeClosed = 1
Variables ¶
View Source
var ErrDataPayloadTooLarge = errors.New("data payload too large")
Functions ¶
This section is empty.
Types ¶
type MessageHandler ¶
type SocketAdapter ¶
type SocketAdapter interface { Close() error // Boolean indicating whether the error was unexpected (true) or not (false) Serve() (bool, error) WaitReady() Name() string SetFeaturesContainer(ct features.Container) WriteControlMessage(message []byte) error SetControlMessageHandler(handler MessageHandler) WriteDataMessage(message []byte) error SetDataMessageHandler(handler MessageHandler) WritePingMessage() error SetPongHandler(handler func()) GetTLSConnectionState() (tls.ConnectionState, bool) GetCommandSerializationType() commands.SerializationType RemoteAddr() net.Addr LocalAddr() net.Addr IsServer() bool IsClient() bool MaxDataPayloadLen() uint16 RefreshFeatures() }
type StreamMessageType ¶
type StreamMessageType = byte
type WebSocketAdapter ¶
type WebSocketAdapter struct {
// contains filtered or unexported fields
}
func NewWebSocketAdapter ¶
func NewWebSocketAdapter(conn net.Conn, serializationType commands.SerializationType, isServer bool, initial *bufio.Reader) *WebSocketAdapter
func (*WebSocketAdapter) Close ¶
func (s *WebSocketAdapter) Close() error
func (*WebSocketAdapter) GetCommandSerializationType ¶
func (s *WebSocketAdapter) GetCommandSerializationType() commands.SerializationType
func (*WebSocketAdapter) GetTLSConnectionState ¶
func (s *WebSocketAdapter) GetTLSConnectionState() (tls.ConnectionState, bool)
func (*WebSocketAdapter) IsClient ¶
func (s *WebSocketAdapter) IsClient() bool
func (*WebSocketAdapter) IsServer ¶
func (s *WebSocketAdapter) IsServer() bool
func (*WebSocketAdapter) LocalAddr ¶
func (s *WebSocketAdapter) LocalAddr() net.Addr
func (*WebSocketAdapter) MaxDataPayloadLen ¶
func (s *WebSocketAdapter) MaxDataPayloadLen() uint16
func (*WebSocketAdapter) Name ¶
func (s *WebSocketAdapter) Name() string
func (*WebSocketAdapter) RefreshFeatures ¶
func (s *WebSocketAdapter) RefreshFeatures()
func (*WebSocketAdapter) RemoteAddr ¶
func (s *WebSocketAdapter) RemoteAddr() net.Addr
func (*WebSocketAdapter) Serve ¶
func (s *WebSocketAdapter) Serve() (bool, error)
func (*WebSocketAdapter) SetControlMessageHandler ¶
func (s *WebSocketAdapter) SetControlMessageHandler(handler MessageHandler)
func (*WebSocketAdapter) SetDataMessageHandler ¶
func (s *WebSocketAdapter) SetDataMessageHandler(handler MessageHandler)
func (*WebSocketAdapter) SetFeaturesContainer ¶
func (*WebSocketAdapter) SetPongHandler ¶
func (s *WebSocketAdapter) SetPongHandler(handler func())
func (*WebSocketAdapter) WaitReady ¶
func (s *WebSocketAdapter) WaitReady()
func (*WebSocketAdapter) WriteControlMessage ¶
func (s *WebSocketAdapter) WriteControlMessage(message []byte) error
func (*WebSocketAdapter) WriteDataMessage ¶
func (s *WebSocketAdapter) WriteDataMessage(message []byte) error
func (*WebSocketAdapter) WritePingMessage ¶
func (s *WebSocketAdapter) WritePingMessage() error
type WebTransportAdapter ¶
type WebTransportAdapter struct {
// contains filtered or unexported fields
}
func NewWebTransportAdapter ¶
func NewWebTransportAdapter(conn *webtransport.Session, netConn net.Conn, serializationType commands.SerializationType, isServer bool) *WebTransportAdapter
func (*WebTransportAdapter) Close ¶
func (s *WebTransportAdapter) Close() error
func (*WebTransportAdapter) GetCommandSerializationType ¶
func (s *WebTransportAdapter) GetCommandSerializationType() commands.SerializationType
func (*WebTransportAdapter) GetTLSConnectionState ¶
func (s *WebTransportAdapter) GetTLSConnectionState() (tls.ConnectionState, bool)
func (*WebTransportAdapter) IsClient ¶
func (s *WebTransportAdapter) IsClient() bool
func (*WebTransportAdapter) IsServer ¶
func (s *WebTransportAdapter) IsServer() bool
func (*WebTransportAdapter) LocalAddr ¶
func (s *WebTransportAdapter) LocalAddr() net.Addr
func (*WebTransportAdapter) MaxDataPayloadLen ¶
func (s *WebTransportAdapter) MaxDataPayloadLen() uint16
func (*WebTransportAdapter) Name ¶
func (s *WebTransportAdapter) Name() string
func (*WebTransportAdapter) RefreshFeatures ¶
func (s *WebTransportAdapter) RefreshFeatures()
func (*WebTransportAdapter) RemoteAddr ¶
func (s *WebTransportAdapter) RemoteAddr() net.Addr
func (*WebTransportAdapter) Serve ¶
func (s *WebTransportAdapter) Serve() (bool, error)
func (*WebTransportAdapter) SetControlMessageHandler ¶
func (s *WebTransportAdapter) SetControlMessageHandler(handler MessageHandler)
func (*WebTransportAdapter) SetDataMessageHandler ¶
func (s *WebTransportAdapter) SetDataMessageHandler(handler MessageHandler)
func (*WebTransportAdapter) SetFeaturesContainer ¶
func (*WebTransportAdapter) SetPongHandler ¶
func (s *WebTransportAdapter) SetPongHandler(handler func())
func (*WebTransportAdapter) WaitReady ¶
func (s *WebTransportAdapter) WaitReady()
func (*WebTransportAdapter) WriteControlMessage ¶
func (s *WebTransportAdapter) WriteControlMessage(message []byte) error
func (*WebTransportAdapter) WriteDataMessage ¶
func (s *WebTransportAdapter) WriteDataMessage(message []byte) error
func (*WebTransportAdapter) WritePingMessage ¶
func (s *WebTransportAdapter) WritePingMessage() error
Click to show internal directories.
Click to hide internal directories.