MCPcopy Create free account
hub / github.com/Tencent/UnLua / socket_bind

Function socket_bind

Plugins/UnLuaExtensions/LuaSocket/Source/src/usocket.cpp:133–139  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

131* Binds or returns error message
132\*-------------------------------------------------------------------------*/
133int socket_bind(p_socket ps, SA *addr, socklen_t len) {
134 int err = IO_DONE;
135 socket_setblocking(ps);
136 if (bind(*ps, addr, len) < 0) err = errno;
137 socket_setnonblocking(ps);
138 return err;
139}
140
141/*-------------------------------------------------------------------------*\
142*

Callers 3

inet_trybindFunction · 0.70
unixdgram_trybindFunction · 0.70
unixstream_trybindFunction · 0.70

Calls 2

socket_setblockingFunction · 0.70
socket_setnonblockingFunction · 0.70

Tested by

no test coverage detected