ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/socket/lowlevel.C
(Generate patch)

Comparing deliantra/server/socket/lowlevel.C (file contents):
Revision 1.85 by root, Mon Oct 29 23:55:57 2012 UTC vs.
Revision 1.86 by root, Tue Oct 30 17:07:50 2012 UTC

310 socket_ev.poll (socket_ev.poll () | EV_READ); 310 socket_ev.poll (socket_ev.poll () | EV_READ);
311 311
312 return true; 312 return true;
313} 313}
314 314
315void
316client::inbuf_handle ()
317{
318 if (!handle_packet ())
319 return;
320
321 while (handle_packet ())
322 ;
323
324 flush ();
325}
326
315// callback called when socket is either readable or writable 327// callback called when socket is either readable or writable
316void 328void
317client::socket_cb (iow &w, int revents) 329client::socket_cb (iow &w, int revents)
318{ 330{
319 //TODO remove when we have better socket cleanup logic 331 //TODO remove when we have better socket cleanup logic
363 // should not be here, normally 375 // should not be here, normally
364 } 376 }
365 else 377 else
366 { 378 {
367 inbuf_len += amount; 379 inbuf_len += amount;
368 380 inbuf_handle ();
369 if (handle_packet ())
370 {
371 while (handle_packet ())
372 ;
373
374 flush ();
375 }
376 } 381 }
377 } 382 }
378} 383}
379 384
380/******************************************************************************* 385/*******************************************************************************

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines