Article View: borland.public.cppbuilder.internet.socket
Article #4119Re: Help using sockets.....
From: Remy Lebeau (TeamB)
Date: Thu, 07 Apr 2005 17:53
Date: Thu, 07 Apr 2005 17:53
35 lines
2377 bytes
2377 bytes
"Paul" <plmacca@clara.co.uk> wrote in message news:4254ea26$1@newsgroups.borland.com... > The server thread still returns zero on the read: Then the socket is actually being disconnected. > There's no write event There usually isn't one. But it can occur occasionally, which is why I provided code for it. > so perhaps I haven't initialised something and the > TForm2::ClientSocket1Connect + TForm1::Write are > causing a write before its ready. No, it cannot be writing before it is ready. The code I gave you does not write anything until the OnConnect event is triggered, which is a safe time to write, and the OnWrite event does not write anything unless a previous write succeeded but just blocked. > Client Error: 10054 WSAECONNRESET (10054) Connection reset by peer. A existing connection was forcibly closed by the remote host. This normally results if the peer application on the remote host is suddenly stopped, the host is rebooted, or the remote host used a "hard close" (see setsockopt for more information on the SO_LINGER option on the remote socket.) Gambit
Technical Details
Message-ID:
<4255731f$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.nuthinbutnews.com!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<425388a2@newsgroups.borland.com> <425396df$1@newsgroups.borland.com> <4254080d$1@newsgroups.borland.com> <42542096$1@newsgroups.borland.com> <4254244a$1@newsgroups.borland.com> <425426cb$1@newsgroups.borland.com> <425445db@newsgroups.borland.com> <425448ec$1@newsgroups.borland.com> <4254657c@newsgroups.borland.com> <4254d272$1@newsgroups.borland.com> <4254ea26$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,b9337a02b76d7efd X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <425388a2@newsgroups.borland.com> <425396df$1@newsgroups.borland.com> <4254080d$1@newsgroups.borland.com> <42542096$1@newsgroups.borland.com> <4254244a$1@newsgroups.borland.com> <425426cb$1@newsgroups.borland.com> <425445db@newsgroups.borland.com> <425448ec$1@newsgroups.borland.com> <4254657c@newsgroups.borland.com> <4254d272$1@newsgroups.borland.com> <4254ea26$1@newsgroups.borland.com> Subject: Re: Help using sockets..... Date: Thu, 7 Apr 2005 10:53:14 -0700 Lines: 37 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <4255731f$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1112896287 68.69.17.41 (7 Apr 2005 10:51:27 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.nuthinbutnews.com!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail