199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
|
*/
size_t socket_send(void *NotUsed, const void *pContent, size_t N){
ssize_t sent;
size_t total = 0;
while( N>0 ){
sent = send(iSocket, pContent, N, 0);
if( sent<=0 ) break;
total += sent;
N -= sent;
pContent = (void*)&((char*)pContent)[sent];
}
return total;
}
/*
** Receive content back from the open socket connection.
|
|
|
|
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
|
*/
size_t socket_send(void *NotUsed, const void *pContent, size_t N){
ssize_t sent;
size_t total = 0;
while( N>0 ){
sent = send(iSocket, pContent, N, 0);
if( sent<=0 ) break;
total += (size_t)sent;
N -= (size_t)sent;
pContent = (void*)&((char*)pContent)[sent];
}
return total;
}
/*
** Receive content back from the open socket connection.
|