MCPcopy Create free account
hub / github.com/dim-an/cod / apiListClientsMain

Function apiListClientsMain

commands.go:195–208  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

193}
194
195func apiListClientsMain() {
196 app := NewApplication()
197 defer app.Close()
198
199 req := server.ListClientsRequest{}
200 rsp := server.ListClientsResponse{}
201
202 err := app.Client().Request(&req, &rsp)
203 verifyFatal(err)
204
205 for _, client := range rsp.Clients {
206 fmt.Printf("%v\t%v\n", client.Pid, client.Shell)
207 }
208}
209
210func initMain(pid uint, shell string) {
211 app := NewApplication()

Callers 1

mainFunction · 0.85

Calls 5

CloseMethod · 0.95
ClientMethod · 0.95
NewApplicationFunction · 0.85
verifyFatalFunction · 0.85
RequestMethod · 0.80

Tested by

no test coverage detected