lwdclient.c revision 499b34cea04a46823d003d4c0520c8b03e8513cb
* Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. /* $Id: lwdclient.c,v 1.12 2001/01/09 21:39:47 bwelling Exp $ */ * If we could create no clients, clean up and return. * This MUST be last, since there is no way to cancel an onshutdown... * run through the idle list and free the clients there. Idle * clients do not have a recv running nor do they have any finds "event received: task %p, length %u, result %u (%s)",
* This function will start a new recv() on a socket for this client manager. * If a recv is already running, don't bother. * If we have no idle slots, just return success. * Issue the recv. If it fails, return that it did. * Set the flag to say we've issued a recv() call. * Remove the client from the idle list, and put it on the running * run through the idle list and free the clients there. Idle * clients do not have a recv running nor do they have any finds * Cancel any pending I/O. * Run through the running client list and kill off any finds * Do all the crap needed to move a client from the run queue to the idle