Go to the source code of this file.
◆ SRecv()
Definition at line 97 of file SRecv.c.
98{
99 int nread;
100 int nleft;
102 int tleft;
107
109
114 tleft = (
int) (done -
now);
115 if (tleft < 1) {
116 nread =
size - nleft;
121 }
122 goto done;
123 }
124
129 tv.tv_sec = tlen;
130 tv.tv_usec = 0;
133
134 break;
136
137 nread =
size - nleft;
139 return (nread);
144 return (-1);
145 }
146 }
147
148#if defined(WIN32) || defined(_WINDOWS)
149 nread =
recv(sfd, (
char *)
buf, nleft,
fl);
150#else
151 nread =
recv(sfd, (
char *)
buf, nleft,
fl);
152#endif
153
154 if (nread <= 0) {
155 if (nread == 0) {
156
158 nread =
size - nleft;
159 goto done;
161 nread =
size - nleft;
162 if (nread == 0)
163 nread = -1;
164 goto done;
165 } else {
167 nread = 0;
168
169 }
170 }
171 nleft -= nread;
172 if ((nleft <= 0) || ((retry == 0) && (nleft != (
int)
size)))
173 break;
176 }
177 nread =
size - nleft;
178
179done:
180 return (nread);
181}
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
INT WSAAPI recv(IN SOCKET s, OUT CHAR FAR *buf, IN INT len, IN INT flags)
INT WSAAPI select(IN INT s, IN OUT LPFD_SET readfds, IN OUT LPFD_SET writefds, IN OUT LPFD_SET exceptfds, IN CONST struct timeval *timeout)
GLenum GLuint GLenum GLsizei const GLchar * buf
#define SELECT_TYPE_ARG234
#define kFullBufferRequired
#define kFullBufferRequiredExceptLast
#define kFullBufferNotRequired