>> Forum: comp.unix.programmer >> Thread: Which is more faster Socket model? >> Message 2 of 2 Save this thread back to search results Subject: Re: Which is more faster Socket model? Date: 01/18/2000 Author: David Schwartz << previous in thread กค next >> Hongki Lee wrote: > > I am developing socket application with Linux & Linuxthread. > Recently I am curious about some socket model. > > The Question is below:(specific in linux) > > 1. Which is more faster model, select() or poll in Linux? Poll is slightly faster, but you should prefer poll for other reasons than speed. > 2. What is more faster model, > A. 1 thread with reading and write and exception handling > using select(). > > B. 1 thread with reading and exception handling using select(), > and 2 or more threads with write handling. > (or B. structure is possible to implement?) In general, B will be faster, but it really depends on details about your protocol. What I usually do is have the thread that created the data check to see if any data is buffered for that connection. If so, it just adds the new data to the buffer. If not, it tries to send the data itself and adds the remainder, if any, to the buffer. > And more question, I heard about Linux SIGIO will runs more faster > than others(select/poll). > Is it possible to handle the 2 or more concurrent socket connections. Yes. I forgot the URL to the web page that describes this. For less than 8,000 connections, it doesn't make much difference. DS