Network Sockets, Threading or select for multiple concurrent connections

University essay from Blekinge Tekniska Högskola/Avdelningen för för interaktion och systemdesign

Author: Nicklas Franzén; [2008]

Keywords: Network; Socket; Select; Threads;

Abstract: The purpose of the thesis is to present a foundation for selecting an appropriate model while building a concurrent network server, focusing on a comparison between a select() based server and one thread for each connection. The test conducted herein is based two echo servers ( the message sent is echoed back to the sender ) and the time they take to serve a number of clients. The programs written for it are run on both Windows and Linux to show if the choice of platform affects the methods efficiency. Also looking at the return time of select() when we have a number of sockets, as well the time it takes to create a set number of threads. The conclusion drawn in this thesis is that for up to 512 sockets there is really no significant difference in the time it takes for the test program to return, this was true for both the Windows and the Linux test. Note however that the threading implementation requires much more memory than the select based one. So in the end it is basically up to personal preferences.

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)