@@ -231,6 +231,11 @@ func (h *Hub) handleRemoteEvent(evt *remoteEvent) {
|
||||
}
|
||||
}
|
||||
|
||||
// Subscribe enqueues a subscribe request for the given connection and channel.
|
||||
func (h *Hub) Subscribe(conn *Conn, channelID string) {
|
||||
h.subscribeCh <- &subscribeRequest{conn: conn, channelID: channelID}
|
||||
}
|
||||
|
||||
// disconnect sends a connection to the disconnect channel.
|
||||
func (h *Hub) disconnect(conn *Conn) {
|
||||
h.disconnectCh <- conn
|
||||
|
||||
Reference in New Issue
Block a user