Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewUserManager ¶
func NewUserManager(room *RoomUnit) *userManager
Types ¶
type RequestedUserInfo ¶
type RoomManager ¶
type RoomManager struct { Addr string RoomSize int UserSize int MsgLen int Frequency int LckRoom sync.Mutex Rooms []*RoomUnit Start bool }
func NewRoomManager ¶
func NewRoomManager(addr string, room, user, msgLen, frequency int) *RoomManager
func (*RoomManager) GetCreatingRoomAvgDuration ¶
func (p *RoomManager) GetCreatingRoomAvgDuration() time.Duration
return the average time consumption of all rooms which are created successfully
func (*RoomManager) GetCreatingUsersAvgDuration ¶
func (p *RoomManager) GetCreatingUsersAvgDuration() time.Duration
func (*RoomManager) RequestRoomsFromServer ¶
func (p *RoomManager) RequestRoomsFromServer(when string)
RoomManager is using for manage Rooms. Host, format for Host: Schema://server:port or Schema://ip:port
type RoomUnit ¶
type RoomUnit struct { Host string // server+port Schema string Id string // room ID Password string PingInterval int // ws/wss PingTimeout int // ws/wss RtcToken string Users []User //users in room UserManager *userManager // for statistics ConnectionDuration time.Duration // contains filtered or unexported fields }
func (*RoomUnit) CreateUsers ¶
func (p *RoomUnit) CreateUsers()
func (*RoomUnit) GetUsersAvgConnectionDuration ¶
return the average time consumption of all rooms which are created successfully
func (*RoomUnit) RequestServerRoom ¶
Click to show internal directories.
Click to hide internal directories.