Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GlobalWsClientManager = ClientManager{ Broadcast: make(chan []byte), Connected: make(chan *Client), Disconnected: make(chan *Client), P2PData: make(chan []byte), ClientsMap: make(map[*Client]bool), OnlineUserMap: make(map[string]*Client), }
View Source
var P2PLocalPeerId string
Functions ¶
func ConnP2PServer ¶
func InitRouter ¶
func InitRouter(conn *grpc.ClientConn) *gin.Engine
func SendP2PMsg ¶
func StartP2PServer ¶
func StartP2PServer()
Types ¶
type Client ¶
func FindUserOnLine ¶
type ClientManager ¶
type ClientManager struct { Broadcast chan []byte Connected chan *Client Disconnected chan *Client P2PData chan []byte ClientsMap map[*Client]bool OnlineUserMap map[string]*Client }
func (*ClientManager) Send ¶
func (clientManager *ClientManager) Send(message []byte, myself *Client)
func (*ClientManager) Start ¶
func (clientManager *ClientManager) Start()
type P2PChannel ¶
Click to show internal directories.
Click to hide internal directories.