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

Function socket_connect

lib/lua/src/usocket.c:191–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189// Client
190
191T_ERRCODE socket_connect(p_socket sock, p_sa addr, int addr_len, int timeout) {
192 int err;
193 if (*sock < 0) {
194 return CLOSED;
195 }
196
197 do {
198 if (connect(*sock, addr, addr_len) == 0) {
199 return SUCCESS;
200 }
201 } while ((err = errno) == EINTR);
202 if (err != EINPROGRESS && err != EAGAIN) {
203 return err;
204 }
205 return socket_wait(sock, WAIT_MODE_C, timeout);
206}
207
208#define SEND_RETRY_COUNT 5
209T_ERRCODE socket_send(

Callers 2

tcp_connectFunction · 0.85
tcp_create_and_connectFunction · 0.85

Calls 1

socket_waitFunction · 0.85

Tested by

no test coverage detected