Documentation ¶
Index ¶
- Variables
- type WebSocket
- func (ws *WebSocket) Broadcast(msg []byte, room string)
- func (ws *WebSocket) Chat(melSess *melody.Session, voidSess models.Session, room string, msg []byte)
- func (ws *WebSocket) Connect(s *melody.Session)
- func (ws *WebSocket) Disconnect(s *melody.Session)
- func (ws *WebSocket) HTTPRequest(w http.ResponseWriter, r *http.Request)
- func (ws *WebSocket) Join(melSess *melody.Session, voidSess models.Session, room string)
- func (ws *WebSocket) Leave(melSess *melody.Session, voidSess models.Session, room string)
- func (ws *WebSocket) Message(s *melody.Session, msg []byte)
- func (ws *WebSocket) Session(melSess *melody.Session, voidSess models.Session)
- func (ws *WebSocket) ToName(name string) func(*melody.Session) bool
- func (ws *WebSocket) ToRoom(room string) func(*melody.Session) bool
- func (ws *WebSocket) Voidsent(melSess *melody.Session, voidSess models.Session, body []byte)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ChatHeader = []byte("chat") JoinAction = []byte("jo") LeaveAction = []byte("lv") SayAction = []byte("sa") WhisperAction = []byte("wh") )
Required for Chat Messages
View Source
var (
SessionHeader = []byte("sess")
)
Required for Session Messages
Functions ¶
This section is empty.
Types ¶
type WebSocket ¶
type WebSocket struct {
// contains filtered or unexported fields
}
func (*WebSocket) Disconnect ¶
func (*WebSocket) HTTPRequest ¶
func (ws *WebSocket) HTTPRequest(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.