Re: netstat shows LISTENING on my client-side socket as well as ESTABLISHED?!
From: Tom Stewart (tastewar_at_msdn.microsoft.com)
Date: 03/16/04
- Next message: William DePalo [MVP VC++]: "Re: PE Dumper"
- Previous message: Rhett Gong [MSFT]: "RE: Details about SetEvent with manual-reset event"
- In reply to: Rhett Gong [MSFT]: "RE: netstat shows LISTENING on my client-side socket as well as ESTABLISHED?!"
- Next in thread: Pavel Lebedinsky: "Re: netstat shows LISTENING on my client-side socket as well as ESTABLISHED?!"
- Reply: Pavel Lebedinsky: "Re: netstat shows LISTENING on my client-side socket as well as ESTABLISHED?!"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 15 Mar 2004 22:11:38 -0500
Hi Rhett-
I appreciate your taking the time to respond. And I appreciate your
explaining why things are as they are. However, if everything is working "as
designed" then I'd have to suggest that (ahem) the design is flawed. Or
perhaps I am missing something. Can someone tell me what *user* of NETSTAT
finds this listing of LISTENING "address objects" to be of value? to someone
attempting to understand what the software running on their box is doing
(which I think is the audience NETSTAT is trying to serve), a LISTENING
address implies one that can be connected to. I just don't understand how an
implementation artifact (this "TDI address object" you mention) would be of
interest to anyone except the guy who invented the concept. ("See, here's
where you can see the second TDI A.O. I create -- right here in the NETSTAT
output. Isn't that cool!!")
I am a programmer, too, been one for many years now, but one of my pet
peeves is when developers explain the way things are as if it is sufficient
justification for behavior that any rational user would find incorrect. I
run into it all the time in my company when programmers take "code elegance"
as the be-all/end-all measure of the value of the code.
And I also have to disagree with you about the side effects. It cost me half
a day of trying to track down where I was creating a listening socket. And
judging from other nntp postings, I'm not the only one. Think about how many
people have wondered what the heck those listening ports were vs. the number
of people (exactly one, me thinks) who find the inclusion of this artifact
valuable. Think for a minute -- if it's always there, what value is there in
listing it?
/rant
Thanks for listening. If indeed you made it this far. And as you might
expect, I've been unable to repro my colleague's success in connecting to
this port.. ;-)
-- Tom "Rhett Gong [MSFT]" <v-raygon@online.microsoft.com> wrote in message news:S$%23XbpvCEHA.660@cpmsftngxa06.phx.gbl... > Hi Tom, > From your description, you would like to know why netstat.exe reports the LISTENING state for a client socket. > > Netstat.exe does not report on sockets, it reports on opened TDI address objects. Every time we make a socket client connection, it creates 2 entries in the > "netstat" output. Both these entries have the same source port number; one is set as ESTABLISHED while the other is set as LISTENING. So what you are seeing is > correct and this is by design as far as I can tell. From my test, this does not have any side effects. > > >When I tried, I was unable to connect to it, but the guy checking > >out the code says he *was* able to. > I get the same answer as you have. Could you let him post his code in this thread? We are all interested in how he made it happen. :-) > > Have a nice day! > Rhett Gong [MSFT] > Microsoft Online Partner Support > > This posting is provided "AS IS" with no warranties, and confers no rights. > Please reply to newsgroups only. Thanks. >
- Next message: William DePalo [MVP VC++]: "Re: PE Dumper"
- Previous message: Rhett Gong [MSFT]: "RE: Details about SetEvent with manual-reset event"
- In reply to: Rhett Gong [MSFT]: "RE: netstat shows LISTENING on my client-side socket as well as ESTABLISHED?!"
- Next in thread: Pavel Lebedinsky: "Re: netstat shows LISTENING on my client-side socket as well as ESTABLISHED?!"
- Reply: Pavel Lebedinsky: "Re: netstat shows LISTENING on my client-side socket as well as ESTABLISHED?!"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|