Versions in this module Expand all Collapse all v0 v0.1.0 May 20, 2020 Changes in this version + var GlobalWsClientManager = ClientManager + var P2PLocalPeerId string + func ConnP2PServer(dest string) (string, error) + func InitRouter(conn *grpc.ClientConn) *gin.Engine + func SendP2PMsg(remoteP2PPeerId string, msg string) error + func StartP2PServer() + type Client struct + Id string + SendChannel chan []byte + Socket *websocket.Conn + User *bean.User + func FindUserOnLine(peerId *string) (*Client, error) + func (client *Client) FindUser(peerId *string) (*Client, error) + func (client *Client) Read() + func (client *Client) Write() + type ClientManager struct + Broadcast chan []byte + ClientsMap map[*Client]bool + Connected chan *Client + Disconnected chan *Client + OnlineUserMap map[string]*Client + P2PData chan []byte + func (clientManager *ClientManager) Send(message []byte, myself *Client) + func (clientManager *ClientManager) Start() + type P2PChannel struct + Address string + IsLocalChannel bool