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

Function socksend

src/sockgetchar.c:13–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11
12
13int socksend(SOCKET sock, unsigned char * buf, int bufsize, int to){
14 int sent = 0;
15 int res;
16 struct pollfd fds;
17
18 fds.fd = sock;
19 fds.events = POLLOUT;
20 do {
21 if(conf.timetoexit) return 0;
22 res = so._poll(&fds, 1, to*1000);
23 if(res < 0 && (errno == EAGAIN || errno == EINTR)) continue;
24 if(res < 1) break;
25 res = so._send(sock, (char *)buf + sent, bufsize - sent, 0);
26 if(res < 0) {
27 if(errno == EAGAIN || errno == EINTR) continue;
28 break;
29 }
30 sent += res;
31 } while (sent < bufsize);
32 return sent;
33}
34
35
36int socksendto(SOCKET sock, struct sockaddr * sin, unsigned char * buf, int bufsize, int to){

Callers 15

proxychildFunction · 0.85
clientnegotiateFunction · 0.85
stdprFunction · 0.85
readreplyFunction · 0.85
readcommandFunction · 0.85
readdataFunction · 0.85
smtppchildFunction · 0.85
ftpprchildFunction · 0.85
icqprchildFunction · 0.85
socks.cFile · 0.85
pop3pchildFunction · 0.85
ftploginFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected