mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-07-21 00:59:22 +00:00
19 lines
574 B
Go
19 lines
574 B
Go
package coordinator
|
|
|
|
// Session represents a session connected from the browser to the current server
|
|
// It requires one connection to browser and one connection to the coordinator
|
|
// connection to browser is 1-1. connection to coordinator is n - 1
|
|
// Peerconnection can be from other server to ensure better latency
|
|
type Session struct {
|
|
ID string
|
|
BrowserClient *BrowserClient
|
|
WorkerClient *WorkerClient
|
|
// CoordinatorClient *CoordinatorClient
|
|
// peerconnection *webrtc.WebRTC
|
|
|
|
// TODO: Decouple this
|
|
handler *Server
|
|
|
|
ServerID string
|
|
RoomID string
|
|
}
|