MCPcopy Create free account
hub / github.com/3proxy/3proxy / sockrecvfrom

Function sockrecvfrom

src/sockgetchar.c:58–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58int sockrecvfrom(SOCKET sock, struct sockaddr * sin, unsigned char * buf, int bufsize, int to){
59 struct pollfd fds;
60 SASIZETYPE sasize;
61 int res;
62
63 fds.fd = sock;
64 fds.events = POLLIN;
65 if(conf.timetoexit) return EOF;
66 if (so._poll(&fds, 1, to)<1) return 0;
67 sasize = SASIZE(sin);
68 do {
69 res = so._recvfrom(sock, (char *)buf, bufsize, 0, (struct sockaddr *)sin, &sasize);
70 } while (res < 0 && (errno == EAGAIN || errno == EINTR));
71 return res;
72}
73
74int sockgetcharcli(struct clientparam * param, int timeosec, int timeousec){
75 int len;

Callers 8

dnsprchildFunction · 0.85
udpresolveFunction · 0.85
addbufferFunction · 0.85
sockgetcharcliFunction · 0.85
sockfillbuffcliFunction · 0.85
sockfillbuffsrvFunction · 0.85
sockgetcharsrvFunction · 0.85
udppmchildFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected