39 |
|
|
40 |
|
#define READBUF_SIZE 16384 |
41 |
|
|
42 |
– |
struct Callback *iorecv_cb = NULL; |
43 |
– |
|
42 |
|
static char readBuf[READBUF_SIZE]; |
43 |
|
static void client_dopacket(struct Client *, char *, size_t); |
44 |
|
|
269 |
|
} |
270 |
|
|
271 |
|
/* |
274 |
– |
* iorecv_default - append a packet to the recvq dbuf |
275 |
– |
*/ |
276 |
– |
void * |
277 |
– |
iorecv_default(va_list args) |
278 |
– |
{ |
279 |
– |
struct Client *client_p = va_arg(args, struct Client *); |
280 |
– |
int length = va_arg(args, int); |
281 |
– |
char *buf = va_arg(args, char *); |
282 |
– |
|
283 |
– |
dbuf_put(&client_p->localClient->buf_recvq, buf, length); |
284 |
– |
return NULL; |
285 |
– |
} |
286 |
– |
|
287 |
– |
/* |
272 |
|
* read_packet - Read a 'packet' of data from a connection and process it. |
273 |
|
*/ |
274 |
|
void |
331 |
|
return; |
332 |
|
} |
333 |
|
|
334 |
< |
execute_callback(iorecv_cb, client_p, length, readBuf); |
334 |
> |
dbuf_put(&client_p->localClient->buf_recvq, readBuf, length); |
335 |
|
|
336 |
|
if (client_p->localClient->lasttime < CurrentTime) |
337 |
|
client_p->localClient->lasttime = CurrentTime; |