Flinkman
Flinkman

Reputation: 17755

How many sockets can be created from a port?

How many sockets can be created from a port?

Upvotes: 13

Views: 21477

Answers (3)

FerranB
FerranB

Reputation: 36807

It's operating system dependent.

  • For Windows, look here for the MaxConnections entry.

  • For Linux, look here as the comment on question says.

Upvotes: 7

Brian Agnew
Brian Agnew

Reputation: 272277

That'll be governed by the number of client-side ports available to your process (that i, when you open a connection to a remote host/port combination, you will also require a port at your end).

The total of client side (or ephemeral) ports will be made available to all the processes on your machine. So it depends on what else is currently running.

The number of ports and the configuration is OS dependent. Just Google for 'max number of ports' plus your OS.

Upvotes: 2

cletus
cletus

Reputation: 625077

This is an operating system limit.

Basically each socket will require a file descriptor (in Linux/Unix terms; it's probably equivalent in Windows). The OS will have a per-process file descriptor limit (say 250-1000) and that'll be the upper limit.

Upvotes: 6

Related Questions