Documentation ¶
Index ¶
- type Connection
- func (w *Connection) HandleFunc(eventName string, handler func(*Message) *Response)
- func (c *Connection) ListenAndServe()
- func (c *Connection) ListenForHandshake(ctx context.Context) error
- func (w *Connection) Send(name string, data any) error
- func (w *Connection) SendMessage(msg *Response) error
- func (w *Connection) Serve()
- func (c *Connection) Stop()
- type Handler
- type Message
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct { DataChannel *webrtc.DataChannel // contains filtered or unexported fields }
func New ¶
func New() *Connection
func (*Connection) HandleFunc ¶ added in v0.1.11
func (w *Connection) HandleFunc(eventName string, handler func(*Message) *Response)
func (*Connection) ListenAndServe ¶ added in v0.1.11
func (c *Connection) ListenAndServe()
func (*Connection) ListenForHandshake ¶
func (c *Connection) ListenForHandshake(ctx context.Context) error
func (*Connection) SendMessage ¶ added in v0.1.11
func (w *Connection) SendMessage(msg *Response) error
func (*Connection) Serve ¶ added in v0.1.11
func (w *Connection) Serve()
func (*Connection) Stop ¶ added in v0.1.11
func (c *Connection) Stop()
Click to show internal directories.
Click to hide internal directories.