Documentation ¶
Index ¶
- type Connection
- func (c *Connection) Close() error
- func (c *Connection) EmitClosing()
- func (c *Connection) Id() string
- func (c *Connection) OnClosing(onClosing func())
- func (c *Connection) ReadPump()
- func (c *Connection) SetOutput(out io.WriteCloser)
- func (c *Connection) Url() string
- func (c *Connection) Write(bytes []byte) (int, error)
- func (c *Connection) WritePump()
- type Hub
- type LockWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
func NewConnection ¶
func NewConnection(ctx context.Context, socket *websocket.Conn) *Connection
func (*Connection) Close ¶
func (c *Connection) Close() error
func (*Connection) EmitClosing ¶
func (c *Connection) EmitClosing()
func (*Connection) Id ¶
func (c *Connection) Id() string
func (*Connection) OnClosing ¶
func (c *Connection) OnClosing(onClosing func())
func (*Connection) ReadPump ¶
func (c *Connection) ReadPump()
func (*Connection) SetOutput ¶
func (c *Connection) SetOutput(out io.WriteCloser)
func (*Connection) Url ¶
func (c *Connection) Url() string
func (*Connection) WritePump ¶
func (c *Connection) WritePump()
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
Hub maintains the set of active peers and broadcasts messages to the peers.
type LockWriter ¶
LockWriter is a writer that locks the underlying writer using a mutex.
func NewLockWriter ¶
func NewLockWriter(writer io.Writer) *LockWriter
Click to show internal directories.
Click to hide internal directories.