server

package
v0.0.0-...-7c5dd78 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Disconnect

func Disconnect()

Disconnect close the websocket with the remote server

func ServerConnection

func ServerConnection()

ServerConnection initiate a new connection (websocket) with remote server

Types

type Request

type Request struct {
}

func NewRequest

func NewRequest() *Request

NewRequest creates a new request struct

func (*Request) Connect

func (r *Request) Connect(userName string)

Connect register the user in the server database.

func (*Request) CreateRoom

func (r *Request) CreateRoom(roomName, ownerName string)

CreateRoom create a new room in the server database

func (*Request) JoinRoom

func (r *Request) JoinRoom(userName, roomID, userID string)

JoinRoom ask the room's owner to join his room

func (*Request) JoinRoomAswer

func (r *Request) JoinRoomAswer(userName, roomID, userID string, accepted bool)

JoinRoomAnswer is the room's owner answer to a previous JoinRoom request from another user

Jump to

Keyboard shortcuts

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