From 036e086123c19d39c54084a5891a76e262ddd451 Mon Sep 17 00:00:00 2001 From: giongto35 Date: Thu, 16 May 2019 02:47:35 +0800 Subject: [PATCH] Add comments --- handler/room/room.go | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/handler/room/room.go b/handler/room/room.go index 9a82afe2..eedd8587 100644 --- a/handler/room/room.go +++ b/handler/room/room.go @@ -19,18 +19,22 @@ import ( type Room struct { ID string + // imageChannel is image stream from director imageChannel chan *image.RGBA + // audioChannel is audio stream from director audioChannel chan float32 + // inputChannel is input stream from websocket to room inputChannel chan int - IsRunning bool - // Done channel is to fire exit event when there is no webRTC session running + // State of room + IsRunning bool + // Done channel is to fire exit event when room is closed Done chan struct{} - - rtcSessions []*webrtc.WebRTC + // List of peerconnections in the room + rtcSessions []*webrtc.WebRTC + // NOTE: Not in use, lock rtcSessions sessionsLock *sync.Mutex - + // Director is emulator director *emulator.Director - // Cloud storage to store room state online onlineStorage *storage.Client }