thread running the handleclient function as resultthis server can process multiple clients at onceand the main dispatcher loop can get quickly back to the top to check for newly arrived requests the net effect is that new clients won' be denied service due to busy server functionallythis version is similar to the fork solution (clients are handled in parallel)but it will work on any machine that supports threadsincluding windows and linux let' test it on both firststart the server on linux machine and run clients on both linux and windows[window thread-based server processserver keeps accepting client connections while threads are servicing prior requests]python thread-server py server connected by ( ' at sun apr : : server connected by ( ' at sun apr : : server connected by ( ' at sun apr : : server connected by ( ' at sun apr : : [window clientbut on same remote server machine]python echo-client py client receivedb"echo=> 'hello network worldat sun apr : : [windows - local clientspcc:\pp \internet\socketspython echo-client py learning-python com client receivedb"echo=> 'hello network worldat sun apr : : :\pp \internet\socketspython echo-client py learning-python com bruce client receivedb"echo=> 'bruceat sun apr : : :\socketspython echo-client py learning-python com the meaning of life client receivedb"echo=> 'theat sun apr : : client receivedb"echo=> 'meaningat sun apr : : client receivedb"echo=> 'ofat sun apr : : client receivedb"echo=> 'lifeat sun apr : : because this server uses threads rather than forked processeswe can run it portably on both linux and windows pc here it is at work againrunning on the same local windows pc as its clientsagainthe main point to notice is that new clients are accepted while prior clients are being processed in parallel with other clients and the main thread (in the five-second sleep delay)[window serveron local pcc:\pp \internet\socketspython thread-server py server connected by ( ' at sun apr : : server connected by ( ' at sun apr : : server connected by ( ' at sun apr : : [windows - clientson local pcc:\pp \internet\socketspython echo-client py client receivedb"echo=> 'hello network worldat sun apr : : :\pp \internet\socketspython echo-client py localhost brian handling multiple clients