|
@@ -128,8 +128,8 @@ func (m *Manager) BroadCast(groupID string, msg []byte) error {
|
|
|
|
|
|
type ConnectionOption func(sessionMap map[string]any)
|
|
type ConnectionOption func(sessionMap map[string]any)
|
|
|
|
|
|
-func WithConnectionContext(key string, context any) ConnectionOption {
|
|
|
|
|
|
+func WithConnectionContext(context any) ConnectionOption {
|
|
return func(sessionMap map[string]any) {
|
|
return func(sessionMap map[string]any) {
|
|
- sessionMap[connectionContextKey+"::"+key] = context
|
|
|
|
|
|
+ sessionMap[connectionContextKey] = context
|
|
}
|
|
}
|
|
}
|
|
}
|