MCPcopy Create free account
hub / github.com/IronsDu/brynet / SocketBlock

Function SocketBlock

include/brynet/net/SocketLibFunction.hpp:48–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48static bool SocketBlock(BrynetSocketFD fd)
49{
50 int err;
51 unsigned long ul = false;
52#ifdef BRYNET_PLATFORM_WINDOWS
53 err = ioctlsocket(fd, FIONBIO, &ul);
54#elif defined BRYNET_PLATFORM_LINUX || defined BRYNET_PLATFORM_DARWIN || defined BRYNET_PLATFORM_FREEBSD
55 err = ioctl(fd, FIONBIO, &ul);
56#endif
57
58 return err != BRYNET_SOCKET_ERROR;
59}
60
61static bool SocketNonblock(BrynetSocketFD fd)
62{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected