Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. COMultiple client connections to a server do not use additional *server* ports. There will still be technical limitations, but it's not the number of ports. Connections are identified on the server side using the unique 4-tuple (server_ip, server_port, client_ip, client_port). You may be thinking of the *socket handles*, where a server socket appears to spawn more socket handles through the `accept()` call.
      singulars
    2. COHmm. Yeah, I guess you're right. http://linux.die.net/man/2/accept says accept will fail if you run out of file descriptors, not ports. I took a look in the linux kernel source code, and from what I can tell the maximum number of files is passed around as an int. That probably limits you to 32K file descriptors, though it'll vary by platform. I'm wrong on the details of why TCP is limited, but I think it's still limited and UDP is a workable alternative.
      singulars
    3. COthanks for comments from you both. i saw the c10k page weeks ago. i remember it suggest epoll(). i wish i could use it with UDP. howver, as i know, epoll is irrelevant to a UDP server that has only one socket to receive, am i correct? the urgency to read packets fast enough is valid. however, i cannot think of a better way to read faster than using a dedicate thread to read packets off the UDP socket and put them in a queue for worker threads to consume. could you advise better methods? many thanks in advance.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload