| 56 | } |
| 57 | |
| 58 | int 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 | |
| 74 | int sockgetcharcli(struct clientparam * param, int timeosec, int timeousec){ |
| 75 | int len; |
no outgoing calls
no test coverage detected