MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / handleRpcResponses

Method handleRpcResponses

source/game/StarTeamClient.cpp:218–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216}
217
218void TeamClient::handleRpcResponses() {
219 List<RpcResponseHandler> stillPendingResponses;
220 while (m_pendingResponses.size() > 0) {
221 auto handler = m_pendingResponses.takeLast();
222 if (handler.first.finished()) {
223 if (auto const& res = handler.first.result()) {
224 if (handler.second)
225 handler.second(*res);
226 }
227 } else {
228 stillPendingResponses.append(std::move(handler));
229 }
230 }
231 m_pendingResponses = stillPendingResponses;
232}
233
234void TeamClient::writePlayerData(JsonObject& request, PlayerPtr player, bool fullWrite) const {
235 request["playerUuid"] = m_clientContext->playerUuid().hex();

Callers

nothing calls this directly

Calls 5

resultMethod · 0.80
sizeMethod · 0.45
takeLastMethod · 0.45
finishedMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected