| 44 | } |
| 45 | |
| 46 | func (s *HttpServer) Run(waitGroup *sync.WaitGroup) { |
| 47 | defer waitGroup.Done() |
| 48 | go s.WsHub.run() |
| 49 | logging.Infof(logging.ProtoWS, "WebSocket Server started on <u>%s</u>", s.HttpServerAddr) |
| 50 | logging.Descf(logging.ProtoWS, "Clients should make first contact with this WebSocket (the Signaling part)") |
| 51 | err := http.ListenAndServe(s.HttpServerAddr, nil) |
| 52 | if err != nil { |
| 53 | panic(err) |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | func (s *HttpServer) serveHome(w http.ResponseWriter, r *http.Request) { |
| 58 | logging.Infof(logging.ProtoHTTP, "Request: <u>%s</u>", r.URL) |