| | |
| | | Subproject commit 25d8c3b20051ebe448d787e3a1be974a276f8215 |
| | | Subproject commit dd22fdb1c82ae93446f5e1166d500331c0ad6a1d |
| | |
| | | mode string |
| | | ipc string |
| | | oneSendnRecv bool |
| | | |
| | | tmm string |
| | | ) |
| | | |
| | | const ( |
| | |
| | | flag.StringVar(&ipc, "i", "ipc:///tmp/pic.ipc", "ipc label") |
| | | |
| | | flag.BoolVar(&oneSendnRecv, "n", true, "one send n recv") |
| | | |
| | | flag.StringVar(&tmm, "t", "server", "") |
| | | } |
| | | |
| | | func modeType(t string) deliver.Mode { |
| | |
| | | func main() { |
| | | flag.Parse() |
| | | |
| | | if tmm == "server" { |
| | | c, _ := deliver.NewServerWithTimeout(deliver.PushPull, ipc, 1000) |
| | | // c := deliver.NewServer(deliver.PushPull, ipc) |
| | | nSenderImpl(c, 0) |
| | | } else if tmm == "client" { |
| | | s, _ := deliver.NewServerWithTimeout(deliver.PushPull, ipc, 100) |
| | | |
| | | oneRecvImpl(s, 0) |
| | | |
| | | } |
| | | return |
| | | m := modeType(mode) |
| | | if m > deliver.ModeStart { |
| | | if proc == act { |