Asynchronous and synchronous connector

I have a situation where there will be 500 simultaneous connections to the server. In terms of response time, which method is faster? (asynchronous or synchronous) And what are the reasons?

I know that an asynchronous socket is like a list of connections, then it will ask for every connection, do you have anything to send or receive. If the list is very long, the response time may take longer. Is it correct?

+3
source share
2 answers

If you use synchronous sockets, 500 connections will require 500 threads. Bad idea. Planning for this number of threads will overshadow the overhead to keep track of 500 asynchronous sockets.

, , , . API, select() /.

+3

. IOCP, -.

, . Stick .

+2

All Articles