Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAppSocket ¶ added in v1.0.1
Types ¶
type ObserverProvider ¶
type Socket ¶
type Socket interface { ID() string Close() error URL() url.URL LocalAddr() net.Addr RemoteAddr() net.Addr RemoteHeader() http.Header Context() interface{} SetContext(v interface{}) Namespace() string Emit(msg string, v ...interface{}) Join(room string) Leave(room string) LeaveAll() Rooms() []string }
type SocketServer ¶ added in v1.0.1
type SocketServer interface { UserSockets(userId int) []AppSocket EmitToRoom(room string, key string, data interface{}) error EmitToUser(userId int, key string, data interface{}) error StartRealtimeServer(engine *gin.Engine, sc goservice.ServiceContext, op ObserverProvider) GetSocketServer() *socketio.Server SaveAppSocket(userId int, appSck AppSocket) }
Click to show internal directories.
Click to hide internal directories.