Socket Error # 10054 reading Connected property

I read the *Connected* property of a TIdCmdTCPClient in a procedure like this : // Delphi2007 indy 10.2.3

      if (Time >=  IncSecond(LastKeepAlive, 5)) and (TCP.Connected = True) then ....
later
     else if TCP.Connected = False then ...

Sometimes it raises the Connection reset by peer error in one line or another :

+exception class   : EIdSocketError+
+exception message : Socket Error # 10054 Connection reset by peer.+

+Main ($944):+
+005acefb +06b FramesInfo.exe IdStackBSDBase           TIdStackBSDBase.RaiseSocketError+
+005acdd5 +011 FramesInfo.exe IdStackBSDBase           TIdStackBSDBase.RaiseLastSocketError+
+005acde4 +008 FramesInfo.exe IdStackBSDBase           TIdStackBSDBase.CheckForSocketError+
+005ad434 +038 FramesInfo.exe IdStackBSDBase           TIdStackBSDBase.Receive+
+005b2051 +011 FramesInfo.exe IdSocketHandle           TIdSocketHandle.Receive+
+005bbfad +0e5 FramesInfo.exe IdIOHandlerStack         TIdIOHandlerStack.ReadFromSource+
+005bba06 +00e FramesInfo.exe IdIOHandlerStack         TIdIOHandlerStack.Connected+
+005bc534 +014 FramesInfo.exe IdTCPConnection          TIdTCPConnection.Connected+
+006116a8 +108 FramesInfo.exe Main             133 +15 UpdateConns+

Is reading the property the cause, or there should be another reason? 
thnx for your efforts..
0
mohamed
1/7/2009 12:47:17 PM
embarcadero.delphi.winsock 1874 articles. 2 followers. Follow

6 Replies
937 Views

Similar Articles

[PageSpeed] 22

<mohamed alayadi> wrote in message news:63807@forums.codegear.com...

> I read the *Connected* property of a TIdCmdTCPClient

I would not recommend doing that.  TIdCmdTCPClient runs an internal thread 
that continuously reads from the socket.  Connnected() also reads from the 
same socket.  Reading from the same socket in different threads can cause 
data corruption in the IOHandler's InputBuffer, at the least.

-- 
Remy Lebeau (TeamB)
0
Remy
1/7/2009 6:11:18 PM
So, how o do to know if the client is still connected?

> {quote:title=Remy Lebeau (TeamB) wrote:}{quote}
> I would not recommend doing that.  TIdCmdTCPClient runs an internal thread
0
mohamed
1/8/2009 7:39:21 AM
<mohamed alayadi> wrote in message news:64333@forums.codegear.com...

> So, how o do to know if the client is still connected?

With TIdCmdTCPClient, you don't, not safely anyway.  If you need to know 
that, then either redesign the code to not need that information, or else 
use TIdTCPClient instead of TIdCmdTCPClient and handle inbound data 
manually.

-- 
Remy Lebeau (TeamB)
0
Remy
1/8/2009 7:51:11 AM
deleted by author

Edited by: S1 Corp. Developer on Jul 16, 2009 3:45 PM
0
S1
7/16/2009 10:45:49 PM
On Thu, 16 Jul 2009 15:45:49 -0700, S1 Corp. Developer <> wrote:

>deleted by author
>
>Edited by: S1 Corp. Developer on Jul 16, 2009 3:45 PM

How is it possible to delete a newsgroup message???

--

Bo Berglund
Developer in Sweden
0
Bo
7/19/2009 7:26:02 PM
Bo Berglund wrote:

> On Thu, 16 Jul 2009 15:45:49 -0700, S1 Corp. Developer <> wrote:
> 
> > deleted by author
> > 
> > Edited by: S1 Corp. Developer on Jul 16, 2009 3:45 PM
> 
> How is it possible to delete a newsgroup message???

It looks like the message was not actually deleted but edited by the
original author by using the web-forum Edit function. You can edit your
own message in the same way, you need to login in the web-forum as
well, here:
https://forums.codegear.com/thread.jspa?messageID=136990&tstart=0#136990

I don't know Forte Agent but most other news readers have a function to
cancel messages. This news server allows you to cancel your own
messages, how this is done in FA, I don't know. In for instance MSOE
the cancel message function will only be enabled if your from name and
email address match with what you have setup in the MSOE account for
these newsgroups. This is an MSOE thingy. AFAIK the NNTP part of this
news server only requires you to be logged-in (to be an authenticated
user).

-- 
Pieter

"My advice to you is get married: if you find a good wife you'll 
 be happy; if not, you'll become a philosopher." -- Socrates.
0
Pieter
7/20/2009 11:41:38 PM
Reply:

Similar Artilces:

Delphi XE HTTP: error "Socket Error #10054 Connection reset by peer" [Edit]
Communication type is set to HTTP, LifeCycle is set to Invocation. Invocation represents a stateless connection, but when the network connection drops, the client throws the error "Socket Error #10054 Connection reset by peer". Are there any other properties to set up apart from LifeCycle? Hi Irina, > Communication type is set to HTTP, LifeCycle is set to Invocation. > > Invocation represents a stateless connection, but when the network connection drops, the client throws the error "Socket Error #10054 Connection reset by peer". Are there any other proper...

"Socket Error # 10054 Connection reset by peer" error in TidHTTPServer
I have been playing around with TidHTTPServer from Indy 10.5.8.0 (supplied with RAD XE2). I am not using any IO handlers, nor am I assigning a stream to Response.ContentStream. I am just returning some text back in Response.ContentText. I am Using IE 8.0 as my web browser, everything works fine until I close the browser, then I get the exception EIdSocketError "Socket Error#10054 Connection Reset By Peer." If I click on continue, the program continues to execute. The curious thing though, the exception only throws when I close the Browser with my server...

[PAClient Error] Error: E0009 Socket Error # 10054
I'm running Windows 7 using Fusion 5 on a Macbook Pro (OSX Maveric). I have recently been able to run and debug to my iPhone and to the iOS Simulator. When returning to my projects I'm no longer able to deploy my projects. (Only changes may be some updates to Windows 7). The Connection to the PAServer is successful and deploying a test project directly from XCode also works. The deployment stops at MyProject.dSYM. In fact Delphi deploys all files except MyProject.dSYM and MyProject if unchecked in the Deployment manager. What am I missing Br Petter It turned out tha...

Error reading from socket error
Hi there, We're using socket server 3-tier for many years. There are 4 application servers(win2000 server), for each up to 500 connections. While error reading from socket raised, we needed to restart socket server or even win2000 server. The socket server version is 5.1.0.0 with multi cpu bug fixed. Any ideas? Thank you ...

Socket Error #10054. Connection reset by peer.
Hello I use Intraweb Ultimate 12.2.8 with Delphi XE2 Update 4. Not always but mostly I get an Exception EIdSocket Error when I show a new IWForm (or going back to the existing). Text: Socket Error #10054. Connection reset by peer. I'm not sure where to look. I write a database application with Oracle and Odac components from DevArts and I use also TMS Intraweb components. Any Idea how I can find out ? Thank you Christian > {quote:title=Christian Bugge wrote:}{quote} > Hello > I use Intraweb Ultimate 12.2.8 with Delphi XE2 Update 4. > > Not always b...

Delphi 5 Indy 10.0.52 connect error not socket
Please can someone explain what error is happening here or how to get an error code try SMTP.Connect; except on e:EidSocketError do begin {whole lots of error trapping here MessageDlg('Socket error on connection. Error code'+inttostr(LastSocketError), mtError, [mbOk], 0); end; on e:Exception do begin uLogFile.putLog('SendMail - Connect error not socket Error : '+e.message); ...

Handling Indy10 exceptions
Hi there everyone, I am using Indy10 TCP Server/Client and I'm thinking of a way to handle an exception of type socket error #10054 - connection reset by peer. This sort of error can happen accidentally for example if the client computer experiences a sudden power failure or the client program is "killed" in the Task Manager. Server side, I have a listview that shows all connected clients. So whenever a socket error #10054 happens, the server MUST remove the client from the listview and return the client's database connection to a connection pool. That is what I've ...

Delphi XE2, datasnap "Socket error 10061 connection refused"?
I cannot get it a datasnap application to work when a server app is installed on another Windows computer. It works fine on the when both client and server run on the same system. I have opened the port I am using in the Firewall on both computers. Any ideas? Thank you, Andre Hi Andrzej, > I cannot get it a datasnap application to work when > a server app is installed on another Windows computer. > It works fine on the when both client and server run on > the same system. I have opened the port I am using > in the Firewall on both computers. Which protocol a...

synchronization problems, error 10054, Unable to read from the 'tcpip' network connection.
This is a multi-part message in MIME format. --------------080809090807050004050703 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit we use sybase 9.0.2.3354. client is PalmOS device (in this particular case TungstenT5). we use static C++ api problem is that quite a lot of times synchronizations don't work. what happens is 1) frontend starts synchronization using GPRS (palm->bluetooth to phone->gprs) 2) mobilink accepts it and show message about it 3) frontend gets succesfully to stage when it writes UL_SYNCH_STATE_RECEIVING_UPLOAD_ACK and w...

Error 890F socket read error on POA
We are experiencing this error on one of the 6.52 POA's. This is a MTP error though the Domain says that all connections are fine. We have noticed a much slower access to this PO as of late. The documentation says check communications between the MTA and POA but this all appears fine. Any thoughts as to what to do next? John Hendriks, > We are experiencing this error on one of the 6.52 POA's. This is a MTP > error though the Domain says that all connections are fine. We have > noticed a much slower access to this PO as of late. The documentation > says check c...

[connect error] Interbase Connect Error
In ODBC connect test is successfully.. but in PowerBuilder 6.5 Database Profiles is displayed error message.. Error Message is SQLSTATE = 40001 [Easysoft][Interbase]Dynamic SQL Error, SQL error code = -91, feature is not supported What means this message? Now I use PowerBuilder 6.5 & Interbase 5.6... Just I choose - Profile Name - Data Source --> This is ODBC DNS..(user DNS) - User ID - Password Does it need more? ...

RE: Error while reading socket: Connection reset by peer at /usr/local/lib/perl5/site_perl/5.6.1/RPC/PlServer/Comm.pm line 110.
Hmmmm. Is the resolved in 5.8 ? Perl 5.6.1 on Win32 leaks socket handles - maybe that's the reason. Windows Server - $VERSION =3D '1.012'; Unix Machine - $VERSION =3D '2.08'; -----Original Message----- From: Steffen Goeldner [mailto:sgoeldner@cpan.org] Sent: Tuesday, August 17, 2004 8:58 AM To: Jochen Wiedmann Cc: dbi-users@perl.org; Woodrow, Michael A, ALABS; Sackner, Beth A, ALABS; Morello, Anthony, ALABS; Long, Dan, ALABS; Esser, Marc A, ALABS Subject: Re: Error while reading socket: Connection reset by peer at /usr/local/lib/perl5/site_perl/5.6.1...

Delphi 2010 + TIBDatabase + connection error (how to catch error) [Edit]
Hi All Could someone help me in this case: {code} Try DataBase.Connect:=True; Except on >databaseconnectionerror< do ShowMessage('DataBase connection faild); end; {code} I do not know, how to catch (handling) IB errors in my Delphi application. Thank You very much in advance Best Regards Jacek Edited by: Jacek Fągowski on Aug 14, 2012 9:04 AM Jacek Fągowski wrote: > Hi All > > Could someone help me in this case: > {code} > Try > DataBase.Connect:=True; > Except > on >databaseconnectionerror< do > ShowMes...

Socket Error #10054 error in IW Demo Project [Edit]
I'm a newbie at webapps and trying to get up to speed using IW in Delphi 2010. I've written and compiled the demo project from the Help file's Creating a New VCL for the Web Application. When I attempt to run it I get the error message Project vclwebdemo.exe raised exception class EIdSocketError with message Socket Error #10054 Connection reset by peer. <Later edit> I've found I get this error when trying to run any of the IW demo projects from http://iwdemos.codeplex.com/ What to do to fix this? TIA Dick Edited by: Richard Bryant on Sep 6, 2009 8:36 ...

Web resources about - Socket Error # 10054 reading Connected property - embarcadero.delphi.winsock

Connected sum - Wikipedia, the free encyclopedia
In mathematics , specifically in topology , the operation of connected sum is a geometric modification on manifolds . Its effect is to join two ...

‘The Washington Post’ Cranks Up Facebook-Connected Political News App The Issue Engine
The Washington Post enhanced its coverage of the 2012 presidential election with its release of news application The Issue Engine , which allows ...

The Value of a Facebook-connected Mobile User
... back more often, and are more likely to become paying customers. Many top game developers, for example, have also found that Facebook-connected ...

Facebook mobile game users play longer, spend more than users not connected with the social network
Mobile game players logged in via Facebook generate more revenue for developers, Facebook Games Strategic Partner Manager Sara Brooks said today ...

CMS-Connected (@cmsconnected) on Twitter
Webinar on Saving your Intranet from the Boneyard (and more) with @sethearley @RHarbridge @JiveSoftware Here => ow.

Better connected: Twitter for BlackBerry
A new version of Twitter for BlackBerry introduces new features that make it easier to connect to the people and things you care about. Twitter ...

Global Trade Network-Exporters,Importers,Manufacturers,Wholesalers,Suppliers,Buyers Connected
Find, Connect & Engage with new Buyers, Suppliers, Manufacturers, Wholesalers, Exporters and Importers all-over the world.

Republicans Connected for iPhone, iPod touch, and iPad on the iTunes App Store
Get Republicans Connected on the App Store. See screenshots and ratings, and read customer reviews.

Malian forces search for al-Qaeda affiliated militants connected to hotel attack
Malian forces search for al-Qaeda affiliated militants connected to hotel attack

Connected cars aren’t just for hacking
Love it or hate it—and we know many of you hate it—the connected car isn't going away. That much was evident at this year's Connected Car Expo, ...

Resources last updated: 12/2/2015 8:42:28 PM