A
Ahmad Jalil Qarshi
Hi,
I have developed a socket based (Connection Less) client application
on AIX 5.2 for a third party server.
The protocol is somewhat like:
1) Connect with server at port 5555
2) Send Request to Server at specified port.
3) Close connection with server. (This is must. Client must close the
port after sending request otherwise the server will not send us
response).
4) Open a listening port at Client (Port: 9999) to receive the
response from Server.
5) Receive Response and process at Client side. (Server is responsible
to Close the connection at port 9999).
Now the problem is that when I close connection with server (using the
close() function) after sending request to server at port 5555,
somehow the port 5555 is not properly closed. The close function
returns 0, which indicates successful close.
When I use netstat on my client machine I can see following port
status.
Proto Recv-Q Send-Q Local Address Foreign
Address (state)
-------- ---------- -----------
--------------------- --------------------------
------------------
tcp4 0 0 server1.59959
200.10.196.3.5555 FIN_WAIT_2
According to TCP/IP protocol it indicates that the Close function is
being called at Client side but server has not properly closed the
port. The third party server vendor is claiming that I am not properly
closing the port at client side so this problem is at client side.
A short description of Client/Server TCP/IP protocol is given at:
http://www.softlab.ntua.gr/faciliti.../unix-socket-faq/unix-socket-faq-2.html#ss2.7
Now what I want to know is where the actual problem, at client side or
server side and what is the solution.
Thanks in anticipation,
Ahmad Jalil Qarshi
I have developed a socket based (Connection Less) client application
on AIX 5.2 for a third party server.
The protocol is somewhat like:
1) Connect with server at port 5555
2) Send Request to Server at specified port.
3) Close connection with server. (This is must. Client must close the
port after sending request otherwise the server will not send us
response).
4) Open a listening port at Client (Port: 9999) to receive the
response from Server.
5) Receive Response and process at Client side. (Server is responsible
to Close the connection at port 9999).
Now the problem is that when I close connection with server (using the
close() function) after sending request to server at port 5555,
somehow the port 5555 is not properly closed. The close function
returns 0, which indicates successful close.
When I use netstat on my client machine I can see following port
status.
Proto Recv-Q Send-Q Local Address Foreign
Address (state)
-------- ---------- -----------
--------------------- --------------------------
------------------
tcp4 0 0 server1.59959
200.10.196.3.5555 FIN_WAIT_2
According to TCP/IP protocol it indicates that the Close function is
being called at Client side but server has not properly closed the
port. The third party server vendor is claiming that I am not properly
closing the port at client side so this problem is at client side.
A short description of Client/Server TCP/IP protocol is given at:
http://www.softlab.ntua.gr/faciliti.../unix-socket-faq/unix-socket-faq-2.html#ss2.7
Now what I want to know is where the actual problem, at client side or
server side and what is the solution.
Thanks in anticipation,
Ahmad Jalil Qarshi