Documentation ¶
Index ¶
Constants ¶
View Source
const ( RoomKeyTypeOneTime = iota RoomKeyTypeForever )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CRoom ¶
type CRoom struct { ClientRoomID string Client *Client IsOwner bool ReqName string ReqUsername string Room *rstructs.Room MessageQueue []string // contains filtered or unexported fields }
func (*CRoom) AddJoinedUser ¶
func (*CRoom) SendMessage ¶
func (*CRoom) UpdateUsers ¶
func (r *CRoom) UpdateUsers(users []rstructs.JoinedUser)
type Client ¶
type Client struct { Host string Path string UserID string // when user creates room, we add CRoom to RoomQueue. When Rooms is filled, // we'll update the CRoom's reference to Room Rooms []*CRoom // rooms the user is in. key is the room id RoomQueue []*CRoom Conn *websocket.Conn PrivateKey *rsa.PrivateKey }
func (*Client) CreateRoom ¶
Click to show internal directories.
Click to hide internal directories.