質問

I am using netstat to display the open port, but I am wondering when a port is opened is it only when a bind() is invoked in a process, or it is already available and the bind just change its state to listen.

正しい解決策はありません

他のヒント

There is a maximum number of ports in a system (depends on the OS, but in general it's 65535 or (2^16)-1), there are privileged ports (<1024) and there are non-privileged ports (>1024). Privileged ports require root permissions to use them, non-privileged allow user processes to bind. But port is considered open or used at the point when you call bind(). You can read up on sockets in general at this location.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top