room

package
v0.0.0-...-bb5b024 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 12, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Room

type Room struct {
	sync.RWMutex
	RoomId  int32
	PktChan chan *av.Packet

	Users map[int64]*user.RoomUser

	UdpConn *net.UDPConn
	// contains filtered or unexported fields
}

func NewRoom

func NewRoom(id int32, us []*protocol.RoomUser) *Room

func (*Room) Broadcast

func (r *Room) Broadcast(p *av.Packet)

func (*Room) BroadcastUdp

func (r *Room) BroadcastUdp(p *av.Packet)

func (*Room) GetGopCache

func (r *Room) GetGopCache(uid int64, ts uint64) *cache.Gop

func (*Room) InRoom

func (r *Room) InRoom(uid int64) bool

func (*Room) JoinRoom

func (r *Room) JoinRoom(uid int64, readerWriter rw.ReaderWriterCloser) bool

func (*Room) LeaveRoom

func (r *Room) LeaveRoom(uid int64)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL