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

Function socket_bind

engine/script/src/luasocket/wsocket.c:151–157  ·  view source on GitHub ↗

-------------------------------------------------------------------------*\ * Binds or returns error message \*-------------------------------------------------------------------------*/

Source from the content-addressed store, hash-verified

149* Binds or returns error message
150\*-------------------------------------------------------------------------*/
151int socket_bind(p_socket ps, SA *addr, socklen_t len) {
152 int err = IO_DONE;
153 socket_setblocking(ps);
154 if (bind(*ps, addr, len) < 0) err = WSAGetLastError();
155 socket_setnonblocking(ps);
156 return err;
157}
158
159/*-------------------------------------------------------------------------*\
160*

Callers 2

unix_trybindFunction · 0.70
inet_trybindFunction · 0.70

Calls 2

socket_setblockingFunction · 0.70
socket_setnonblockingFunction · 0.70

Tested by

no test coverage detected