accept() not opening new ports.
Hello,
I have client server setup, S and C using TCp sockets.
linux1 as server and linux3 as
On server side i have an infinte loop, which accepts connections,
When i try to connect to a new to the listening port, it connects
but on server side no new port is openend, attaches itself to the Listening port,
# netstat -a | grep 59184
tcp 0 0 linux1.59184 *.* LISTEN
after connect,
# netstat -a | grep 59184
tcp 0 0 linux1.59184 *.* LISTEN
tcp 0 0 linux1.59184 linux3.32885 ESTABLISHED
so when i try to close the the new socket id , the listening socket is closed.
why is this happening, the server should have opened a new port to handle the new connection?
|