MCPcopy Create free account
hub / github.com/baldurk/renderdoc / SendReceive

Method SendReceive

renderdoc/android/jdwp_connection.cpp:87–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87bool Connection::SendReceive(Command &cmd)
88{
89 CommandSet sentSet = cmd.commandset;
90 byte sentCmd = cmd.command;
91
92 // send the command, and receive the reply back into the same object.
93 // save the auto-generated ID for this command so we can compare it to the reply - we expect a
94 // synchronous reply, no other commands in the way.
95 uint32_t id = cmd.Send(writer);
96 cmd.commandset = CommandSet::Unknown;
97 cmd.command = 0;
98 cmd.Recv(reader);
99 Threading::Sleep(10);
100
101 if(id != cmd.GetID())
102 {
103 RDCERR("Didn't get matching reply packet for %d/%d (id %u), received %d/%d (id %u)", sentSet,
104 sentCmd, id, cmd.commandset, cmd.command, cmd.GetID());
105 error = true;
106 return false;
107 }
108
109 return true;
110}
111
112void Connection::SetupIDSizes()
113{

Callers

nothing calls this directly

Calls 4

SendMethod · 0.80
RecvMethod · 0.80
SleepFunction · 0.50
GetIDMethod · 0.45

Tested by

no test coverage detected