MCPcopy Create free account
hub / github.com/apache/thrift / socket_bind

Function socket_bind

lib/lua/src/usocket.c:117–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117T_ERRCODE socket_bind(p_socket sock, p_sa addr, int addr_len) {
118 int ret = socket_setblocking(sock);
119 if (ret != SUCCESS) {
120 return ret;
121 }
122 if (bind(*sock, addr, addr_len)) {
123 ret = errno;
124 }
125 int ret2 = socket_setnonblocking(sock);
126 return ret == SUCCESS ? ret2 : ret;
127}
128
129T_ERRCODE socket_get_info(p_socket sock, short *port, char *buf, size_t len) {
130 struct sockaddr_storage sa;

Callers 1

tcp_bindFunction · 0.85

Calls 3

socket_setblockingFunction · 0.85
socket_setnonblockingFunction · 0.85
bindFunction · 0.50

Tested by

no test coverage detected