| | |
| | | Subproject commit fb46ee747046ea8634638fba3384ac20358deb49 |
| | | Subproject commit 20a4c4bfb5b9ea427f9117408ff0e4513ebef9eb |
| | |
| | | go 1.12 |
| | | |
| | | require ( |
| | | basic.com/valib/shm.git v0.0.0-20190826054634-a0123f163edd |
| | | basic.com/valib/shm.git v0.0.0-20190826090635-7db9aba5ca93 |
| | | github.com/gorilla/websocket v1.4.1 // indirect |
| | | golang.org/x/sys v0.0.0-20190825160603-fb81701db80f |
| | | nanomsg.org/go-mangos v1.4.0 |
| | |
| | | basic.com/valib/shm.git v0.0.0-20190826054634-a0123f163edd h1:hRQzhw2zyfLY9vdbuv/dw92BVjax8xx9fFeNBu4U9/U= |
| | | basic.com/valib/shm.git v0.0.0-20190826054634-a0123f163edd/go.mod h1:yYRM7bM9y0KKd4IfNt3myjsvkFVFIIWNjsvK14tNbq4= |
| | | basic.com/valib/shm.git v0.0.0-20190826090635-7db9aba5ca93 h1:KawyUKwFGIQIv043VGV1QvXOiU8aq7DEyB3QhAq+Syc= |
| | | basic.com/valib/shm.git v0.0.0-20190826090635-7db9aba5ca93/go.mod h1:yYRM7bM9y0KKd4IfNt3myjsvkFVFIIWNjsvK14tNbq4= |
| | | github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= |
| | | github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= |
| | | golang.org/x/sys v0.0.0-20190825160603-fb81701db80f h1:LCxigP8q3fPRGNVYndYsyHnF0zRrvcoVwZMfb8iQZe4= |
| | |
| | | "time" |
| | | |
| | | "golang.org/x/sys/unix" |
| | | |
| | | "net/http" |
| | | _ "net/http/pprof" |
| | | ) |
| | | |
| | | var ( |
| | |
| | | func main() { |
| | | flag.Parse() |
| | | |
| | | if server { |
| | | go func() { |
| | | http.ListenAndServe("0.0.0.0:6061", nil) |
| | | }() |
| | | } |
| | | |
| | | fnMap := map[string]func(context.Context, bool, string, int){ |
| | | push: profile.Push, |
| | | pull: profile.Pull, |
| | |
| | | return |
| | | default: |
| | | if err = s.Send(buf); err != nil { |
| | | s.Close() |
| | | url := "hello" |
| | | i, err := deliver.NewClientWithError(deliver.Shm, url) |
| | | for { |
| | | if err == nil { |
| | | break |
| | | } |
| | | time.Sleep(1 * time.Second) |
| | | i, err = deliver.NewClientWithError(deliver.Shm, url) |
| | | |
| | | fmt.Println("client create failed : ", err) |
| | | // s.Close() |
| | | // url := "hello" |
| | | // i, err := deliver.NewClientWithError(deliver.Shm, url) |
| | | // for { |
| | | // if err == nil { |
| | | // break |
| | | // } |
| | | // time.Sleep(1 * time.Second) |
| | | // i, err = deliver.NewClientWithError(deliver.Shm, url) |
| | | |
| | | } |
| | | s = i |
| | | // fmt.Println("client create failed : ", err) |
| | | |
| | | // } |
| | | // s = i |
| | | |
| | | fmt.Printf("can't send message on push socket: %s\n", err.Error()) |
| | | } else { |
| | |
| | | Subproject commit a0123f163eddcea3e6b9f9d36f1f3fb3aa2c835a |
| | | Subproject commit 7db9aba5ca931982d0f688a796c7ba4a70d0c8de |