Article View: borland.public.cppbuilder.internet.socket
Article #1345socket issue
From: mat
Date: Fri, 09 Feb 2007 02:09
Date: Fri, 09 Feb 2007 02:09
32 lines
2078 bytes
2078 bytes
hello,im using a socketconnection component to connect to a datasnap server.i do socketconnection->connected=true; the code is in a separate thread and i have some application->processmessages in order to get some visual feedback (e.g. a messagebox before it starts connected and a messagebox if it connects). the code is of course in a try catch . the issue is the following: when i try to connect to an existing pc it does what its supposed to do almost immediately, if the datasnap server is up it connects ,if its not up (e.g. if im not running the scktsrv.exe)it throws an exception. when i try to connect to an not existing pc (wrong ip) the system freezes and waits for a rather big timeout. if i try to connect to a firewalled pc (which blocks such incomming) it freezes again and waits for a rather big timeout again. is this something i can fix?the waiting timeout is very big,and the program freezes (although its in its own thread). i thought of first pinging the remote pc to see if its up and then try to connect to it but that would introduce another waiting time(the ping waiting time) what do people usually do to deal with this kind of problems? thks
Technical Details
Message-ID:
<45cbd7c8$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11508e,54a50302c070b08c,start X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "mat" <mat@hotmail.com> Newsgroups: borland.public.cppbuilder.internet.socket Subject: socket issue Date: Fri, 9 Feb 2007 02:09:16 -0000 Lines: 34 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 NNTP-Posting-Host: 131.227.231.116 Message-ID: <45cbd7c8$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1170986952 131.227.231.116 (8 Feb 2007 18:09:12 -0800) Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail