2021-10-21 15:51:34 +00:00
|
|
|
/*
|
|
|
|
* @Author: your name
|
|
|
|
* @Date: 2021-10-21 20:30:24
|
2021-10-26 11:55:55 +00:00
|
|
|
* @LastEditTime: 2021-10-22 22:49:21
|
2021-10-21 15:51:34 +00:00
|
|
|
* @LastEditors: Please set LastEditors
|
|
|
|
* @Description: In User Settings Edit
|
|
|
|
* @FilePath: \webrtc_easy_signal\main.go
|
|
|
|
*/
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"net/http"
|
|
|
|
)
|
|
|
|
|
|
|
|
// 启动程序
|
|
|
|
func StartWebsocket(addrPort string) {
|
|
|
|
WsConnAll = make(map[int64]*WsConnection)
|
|
|
|
http.HandleFunc("/ws", WsHandler)
|
|
|
|
http.ListenAndServe(addrPort, nil)
|
|
|
|
}
|
|
|
|
|
2021-10-26 11:55:55 +00:00
|
|
|
func main(){
|
2021-10-21 15:51:34 +00:00
|
|
|
StartWebsocket(fmt.Sprintf("0.0.0.0:9555"))
|
2021-10-26 11:55:55 +00:00
|
|
|
}
|