468,303 Members | 1,405 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,303 developers. It's quick & easy.

Problem with Closing TCP connection

Dear All,

I am currently developing a tool using Python 2.4.2 which will be used
as a sink to pump TCP messages. During which i have observed that the
TCP close interface provided by Python is not closing the connection.
This i confirmed by looking at the ethereal logs, which show proper 3
way FIN ACK Handshake. But the netstat reports TIME_WAIT state for the
TCP connection, which is hindering the messages to be pumped later. I
would like to know whether the problem exists Python close and is
there is turnaround? to the mentioned problem.

Thanks,

Madhur

May 5 '07 #1
1 1362
On 5 May, 12:18, Madhur <madhurr...@gmail.comwrote:
[...]
as a sink to pump TCP messages. During which i have observed that the
TCP close interface provided by Python is not closing the connection.
This i confirmed by looking at the ethereal logs, which show proper 3
way FIN ACK Handshake. But the netstat reports TIME_WAIT state for the
TCP connection, which is hindering the messages to be pumped later. I
would like to know whether the problem exists Python close and is
there is turnaround? to the mentioned problem.
IIRC, this is normal operation of TCP connections. A very short
explanation is here (http://www.unixguide.net/network/socketfaq/
2.7.shtml).
So it is not a problem of Python.
I don't know exactly what you want to do, but I suggest you look at
one of the following options:
- Either get IP messages and filter them, same way as ethereal.
Probably complicated coding.
- Depending on your problem, you may try opening the TCP socket in
Python using the SO_REUSEADDR option.

Regards,
k

May 5 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by flupke | last post: by
1 post views Thread by Dmitry Akselrod | last post: by
4 posts views Thread by Mahesh D. Rane | last post: by
6 posts views Thread by Steven Blair | last post: by
2 posts views Thread by Droopy | last post: by
8 posts views Thread by ra294 | last post: by
7 posts views Thread by Tumurbaatar S. | last post: by
5 posts views Thread by DaM | last post: by
2 posts views Thread by Cc | last post: by
22 posts views Thread by b_r | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.