server

package
v0.0.1-a.4 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MAYOR = "mayor"
View Source
var Translator chan language.Speak = make(chan language.Speak)

Functions

func HandleConnection

func HandleConnection(connection *websocket.Conn, puid *string)

func Mayor

func Mayor(w http.ResponseWriter, req *http.Request)

func People

func People(w http.ResponseWriter, req *http.Request)

func RoutineAuth

func RoutineAuth()

Auth client 1- Get uuid from token 2- Set uuid of puid 3- If puid had uuid and valid, do not auth 4- If puid was valid and user send empty token, we'll unauth

func RoutineDisconnect

func RoutineDisconnect()

Disconnect user routine 1- we get user id 2- (TODO) remove from other home as people 3- we destroy user home 4- unregister user from registeration

func RoutineHandshake

func RoutineHandshake()

Handshake client with other client 1- Get message.Id , how want to handshake 2- Create a room named message.Id in my home 3- Add me to people of other client home

func RoutineRequest

func RoutineRequest()

func RoutineTranslate

func RoutineTranslate()

Get message and send to other routine by message type

func Serve

func Serve(port string)

func Translate

func Translate(puid *string, data []byte) (err error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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