Keeping Your Server Responsive Perform any networking operation in a non-blocking manner, or in a separate thread or process. Close sockets of clients that got disconnected, or you'll eat up the maximum number of allowed file descriptors, and thus won't be able to accept any new clients. Make sure your design does not impose any built-in limitations, up to the number of clients you intend to support, and then allow space for growth.