MCPcopy Create free account
hub / github.com/defold/defold / SendAll

Function SendAll

engine/dlib/src/dlib/log.cpp:186–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186static dmSocket::Result SendAll(dmSocket::Socket socket, const char* buffer, int length)
187{
188 int total_sent_bytes = 0;
189 int sent_bytes = 0;
190
191 while (total_sent_bytes < length)
192 {
193 dmSocket::Result r = dmSocket::Send(socket, buffer + total_sent_bytes, length - total_sent_bytes, &sent_bytes);
194 if (r == dmSocket::RESULT_TRY_AGAIN)
195 continue;
196
197 if (r != dmSocket::RESULT_OK)
198 {
199 return r;
200 }
201
202 total_sent_bytes += sent_bytes;
203 }
204
205 return dmSocket::RESULT_OK;
206}
207
208static void dmLogUpdateNetwork()
209{

Callers 1

dmLogUpdateNetworkFunction · 0.70

Calls 1

SendFunction · 0.70

Tested by

no test coverage detected