server

package
v0.0.0-...-25025e5 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2022 License: Unlicense Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Participant

type Participant struct {
	CurrentRoom *room

	Out chan *pb.ServerMessage

	DisconnectChan chan interface{}
	// contains filtered or unexported fields
}

func NewParticipant

func NewParticipant(username string) (*Participant, error)

func (Participant) String

func (p Participant) String() string

type RoomID

type RoomID string

type RoomManager

type RoomManager struct {
	// contains filtered or unexported fields
}

func NewRoomManager

func NewRoomManager() (*RoomManager, error)

func (*RoomManager) Close

func (rm *RoomManager) Close()

func (*RoomManager) CreateRoom

func (rm *RoomManager) CreateRoom(name string) (RoomID, error)

func (*RoomManager) GetRoom

func (rm *RoomManager) GetRoom(id RoomID) (*room, bool)

type RoomMessage

type RoomMessage struct {
	CMsgP       *pb.ClientMessage
	Participant *Participant
}

Jump to

Keyboard shortcuts

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