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

Method sendMessage

source/application/StarP2PNetworkingService_pc.cpp:277–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275}
276
277bool PcP2PNetworkingService::SteamP2PSocket::sendMessage(ByteArray const& message) {
278 MutexLocker socketLocker(mutex);
279 if (!connected)
280 return false;
281
282 if (!SteamNetworking()->SendP2PPacket(steamId, message.ptr(), message.size(), k_EP2PSendReliable))
283 throw ApplicationException("SteamNetworking::SendP2PPacket unexpectedly returned false");
284 return true;
285}
286
287Maybe<ByteArray> PcP2PNetworkingService::SteamP2PSocket::receiveMessage() {
288 MutexLocker socketLocker(mutex);

Callers 1

writeDataMethod · 0.80

Calls 5

SendNetworkMessageMethod · 0.80
LobbyManagerMethod · 0.80
formatFunction · 0.50
ptrMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected