Documentation
¶
Index ¶
Constants ¶
View Source
const (
PoolContextKey contextKey = "pool"
)
Variables ¶
View Source
var (
Pool = NewConnectionPool()
)
Functions ¶
Types ¶
type ConnectionPool ¶
type ConnectionPool struct {
// contains filtered or unexported fields
}
func NewConnectionPool ¶
func NewConnectionPool() *ConnectionPool
func (*ConnectionPool) Publish ¶
func (p *ConnectionPool) Publish(msg []byte)
Publish sends a message to all connections in the pool
eg:
ws.Pool.Publish([]byte("wu tang killa-beez, we on a swarm"))
Click to show internal directories.
Click to hide internal directories.