why cannot we use process id insted of taking the port we are binding in socket programming. in socket programming we create socket and get a socket descriptor and we bind to a specific port .for multiple connection why are we not using the process id as all the connection are also a process returning the processs id?
相关问题
- Multiple sockets for clients to connect to
- IPAddress.[Try]Parse parses 192.168 to 192.0.0.168
- Drakma and Dexador both fails at USocket call whil
- What would prevent code running in a Docker contai
- How to run tcp and udp on a single port at same ti
相关文章
- Socket编程 TCP方式发送时间有点长
- RMI Threads prevent JVM from exiting after main()
- fsc.exe is very slow because it tries to access cr
- socket() returns 0 in C client server application
- Passing extra metadata to a RequestHandler using p
- How do I get the external IP of a socket in Python
- Native hooking in Android Client
- Is zeroing out the “sockaddr_in” structure necessa
It's an interesting idea, but I think it would raise a few problems:
Because TCP has port numbers in the specification but it doesn't have process IDs.
Why would you want to use a processID that you can't control when you can control the port number? How would a process listen on multiple ports?
First, multiple connections can exist per process. Second, socket API is does not depend on any OS process API.