Documentation ¶
Index ¶
- func Broadcast(data []byte, filter *Filter) error
- func BroadcastBinary(data []byte, filter *Filter) error
- func Init(ctx contextx.Context, r *gin.RouterGroup, opfs ...func(opt Options))
- func OnConnect(fn func(*melody.Session))
- func OnDisConnect(fn func(*melody.Session))
- func OnMessage(fn func(session *melody.Session, bytes []byte))
- func OnMessageBinary(fn func(session *melody.Session, bytes []byte))
- type Filter
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BroadcastBinary ¶
func OnDisConnect ¶
func OnDisConnect(fn func(*melody.Session))
func OnMessageBinary ¶
func OnMessageBinary(fn func(session *melody.Session, bytes []byte))
Types ¶
type Filter ¶
type Filter struct { Keys map[string]map[interface{}]struct{} // contains filtered or unexported fields }
func NewBlacklistFilter ¶
func NewWhitelistFilter ¶
Click to show internal directories.
Click to hide internal directories.