"io"
"net/http"
"net/url"
+ "os"
"runtime"
"strings"
"testing"
)
type Common struct {
+ PID int //进程id
Uid int //client uid
Live []LiveQn //直播流链接
Live_qn int //当前直播流质量
}
func (t *Common) Init() Common {
+ t.PID = os.Getpid()
+
t.AllStreamType = map[string]StreamType{
`fmp4`: {
Protocol_name: "http_hls",
os.Exit(1)
}()
+ danmulog.L(`I: `, `当前PID:`, c.C.PID)
+
//启动时显示ip
{
if v, ok := c.C.K_v.LoadV("启动时显示ip").(bool); ok && v {
package main
-import (
- // "runtime"
+import ( // "runtime"
// "runtime/pprof"
- "os"
- // "log"
- "fmt"
// "net/http"
// _ "net/http/pprof"
-
// "github.com/skratchdot/open-golang/open"
q "github.com/qydysky/bili_danmu"
)
// time.Sleep(time.Duration(3)*time.Second)
// }()
// go func() {
- fmt.Printf("PID:%d\n", os.Getpid())
// for {
// View()
// time.Sleep(time.Duration(60) * time.Second)