MCPcopy Create free account
hub / github.com/ddnet/ddnet / net_tcp_send

Function net_tcp_send

src/base/net.cpp:1339–1353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1337}
1338
1339int net_tcp_send(NETSOCKET sock, const void *data, int size)
1340{
1341 int bytes = -1;
1342
1343 if(sock->ipv4sock >= 0)
1344 {
1345 bytes = send(sock->ipv4sock, (const char *)data, size, 0);
1346 }
1347 if(sock->ipv6sock >= 0)
1348 {
1349 bytes = send(sock->ipv6sock, (const char *)data, size, 0);
1350 }
1351
1352 return bytes;
1353}
1354
1355int net_tcp_recv(NETSOCKET sock, void *data, int maxsize)
1356{

Callers 2

AcceptClientMethod · 0.85
SendMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected