| "v.io/core/veyron/lib/modules" |
| "v.io/core/veyron/services/wsprd/wspr" |
| port *int = flag.CommandLine.Int("port", 0, "Port to listen on.") |
| identd *string = flag.CommandLine.String("identd", "", "identd server name. Must be set.") |
| modules.RegisterChild(WSPRCommand, usage(flag.CommandLine), startWSPR) |
| func startWSPR(stdin io.Reader, stdout, stderr io.Writer, env map[string]string, args ...string) error { |
| ctx, shutdown := v23.Init() |
| l := v23.GetListenSpec(ctx) |
| proxy := wspr.NewWSPR(ctx, *port, &l, *identd, nil) |
| fmt.Fprintf(stdout, "WSPR_ADDR=%s\n", addr) |
| modules.WaitForEOF(stdin) |