|
|
|
|
|
by pdx
5081 days ago
|
|
I have a question regarding socket programming in general. Let's say I want to build some sort of notification service. This could be instant messages, presence indication, or notification of file changes ala dropbox. Now let's say that most of my clients are behind firewalls, forcing me to tie up one of my ports for each client as I do long polling or something else to keep the connection through their NAT open. How do you keep from running out of ports? I only have 65K ports, right? How do some of these companies that have millions of open connections do it? |
|
You can have 65535 connections (in theory) from a single client to your port 80. And another 65535 from a different client to port 80 on the same server.
If you're serving a bunch of different clients it's not a problem.