 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Arnau Font Guest
|
Posted: Thu May 10, 2007 2:45 pm Post subject: Connection problems using TCP/IP sockets under Vista |
|
|
Hi group,
I've developed a server application that receives TCP/IP connections using a
TIdTCPServer from some devices located in the local network. These devices
are not PCs.
Under XP everything goes fine, but under Windows Vista this TCP/IP
connections become invalid after some hours, even though the socket does not
raise an exception, it just stops receiving information. Data is being sent
every 4 seconds through the socket.
Does anybody have an idea why this happens?
Thanks! |
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Thu May 10, 2007 11:17 pm Post subject: Re: Connection problems using TCP/IP sockets under Vista |
|
|
"Arnau Font" <afont (AT) nospam_really_ipssoft (DOT) com> wrote in message
news:4642e982 (AT) newsgroups (DOT) borland.com...
| Quote: | Under XP everything goes fine, but under Windows Vista this
TCP/IP connections become invalid after some hours
|
How are you determining that exactly?
| Quote: | even though the socket does not raise an exception
|
Are you sure about that? You are not catching exceptions in your own
code, are you?
| Quote: | it just stops receiving information.
|
Highly unlikely, unless the devices actually disconnected from the
server.
Gambit |
|
| Back to top |
|
 |
Arnau Font Guest
|
Posted: Fri May 11, 2007 1:13 pm Post subject: Re: Connection problems using TCP/IP sockets under Vista |
|
|
"Remy Lebeau (TeamB)" <no.spam (AT) no (DOT) spam.com> ha escrit en el missatge dels
grups de discussió:464361a6$1 (AT) newsgroups (DOT) borland.com...
| Quote: |
"Arnau Font" <afont (AT) nospam_really_ipssoft (DOT) com> wrote in message
news:4642e982 (AT) newsgroups (DOT) borland.com...
Under XP everything goes fine, but under Windows Vista this
TCP/IP connections become invalid after some hours
How are you determining that exactly?
|
The device sends me periodically a keepalive command (something like a NOOP
in a FTP) to be sure that the connection is still alive. If my server
doesn't receive any command like this in a specified time, we suppose that
the connection has been broken. When this happens, I raise in the server a
IdException with a special message (yes, I should have inherited from
IdException, but...) and register it in the EventViewer from Windows. I get
an error event randomly.
| Quote: |
even though the socket does not raise an exception
Are you sure about that? You are not catching exceptions in your own
code, are you?
|
I use the TIdTCPServer OnException event, and I do register separetely all
TIdExceptions and the rest of exceptions, so I'm sure that my exceptions
doesn't mess in all this.
| Quote: |
it just stops receiving information.
Highly unlikely, unless the devices actually disconnected from the
server.
|
Until now, this only happened when you take out the LAN cable. The server
didn't notice that the connection was broken.
Apart from all this, the important thing is that in Windows 2000 and XP this
worked, but in Vista doesn't...
Thanks,
Arnau. |
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Sat May 12, 2007 1:52 am Post subject: Re: Connection problems using TCP/IP sockets under Vista |
|
|
"Arnau Font" <afont (AT) nospam_really_ipssoft (DOT) com> wrote in message
news:46442584 (AT) newsgroups (DOT) borland.com...
| Quote: | The device sends me periodically a keepalive command (something
like a NOOP in a FTP) to be sure that the connection is still alive.
If my server doesn't receive any command like this in a specified
time, we suppose that the connection has been broken.
|
Can you show your server code that is reading the data? Did you
verify with a packet sniffer, such as Ethereal, that no data is
actually reaching the machine and you are just not reading it
correctly?
| Quote: | Until now, this only happened when you take out the LAN cable.
The server didn't notice that the connection was broken.
|
It is not supposed to. WinSock was never designed to handle pulling
out the physical cable, and most systems don't issue out notifications
or invalidate active sockets when you do so. Hense the need for
manual timeouts in order to detect such abnormal disconnects.
| Quote: | Apart from all this, the important thing is that in Windows 2000 and
XP this
worked, but in Vista doesn't...
|
Then I suggest you take it up with the Microsoft people to find out
what they changed (and broken) internally. It doesn't surprise me,
though - Vista breaks a lot of stuff for existing applications.
Gambit |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|