Documentation ¶
Index ¶
- Constants
- type AckMessage
- type Config
- type Event
- type Message
- type MessageAction
- type MessageType
- type NSocket
- func (nsoc *NSocket) Broadcast(v interface{}, s *melody.Session) (err error)
- func (nsoc *NSocket) BroadcastAll(v interface{}) (err error)
- func (nsoc *NSocket) Emit(v interface{}, i ...interface{}) (err error)
- func (nsoc *NSocket) EmitAll(v interface{}, namespace string) (err error)
- func (nsoc *NSocket) Namespaces() map[string][]*melody.Session
- func (nsoc *NSocket) Serve(w http.ResponseWriter, r *http.Request) (err error)
- type Namespace
- type RecFunc
- type SendFunc
Constants ¶
View Source
const (
Default string = "default"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AckMessage ¶
type Config ¶
type Message ¶
type Message struct { Id uuid.UUID `json:"id"` Type MessageType `json:"type"` Body interface{} `json:"body"` Action MessageAction `json:"action,omitempty"` Namespace string `json:"namespace,omitempty"` }
type MessageAction ¶
type MessageAction string
const ( Nil MessageAction = "" Subscribe MessageAction = "subscribe" UnSubscribe MessageAction = "unsubscribe" OnNamespaceConnected = "OnNamespaceConnected" OnNamespaceDisconnect = "OnNamespaceDisconnect" )
type MessageType ¶
type MessageType string
Click to show internal directories.
Click to hide internal directories.