Article View: borland.public.cppbuilder.internet.socket
Article #3848Re: TWinSocketStream->Write / Read questions
From: Remy Lebeau (TeamB)
Date: Mon, 06 Jun 2005 17:01
Date: Mon, 06 Jun 2005 17:01
30 lines
1913 bytes
1913 bytes
"Guenter Stubbe" <no-spam@no.spam.com> wrote in message news:42a475d3$1@newsgroups.borland.com... > If I call the Write method two or more times successively, not > all data is transfered (in my application). If I code a Sleep(50) > between them, the transfer works. I have never had to use Sleep() with TWinSocketStream. Successive reads/writes without sleeping has always worked fine for me without problem. Please show your actual code. > The Read method of TWinSocketStream can return a "-1"? The only way for Read() to return -1 is if a socket error occured. But if that happened, you should be getting a ESocketError exception as well. > In the german help there is a hint, that the WaitForData method > should be called always, if a Read or Write method is called > afterwards: In my code, the WaitForData only works for the Read > method... That is correct. The help is wrong. > What is a usual size for packets written or read via TWinSocketStream? Makes no difference. Gambit
Technical Details
Message-ID:
<42a48164$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<42a475d3$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,4f2a9ddd9f75b2b 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: <42a475d3$1@newsgroups.borland.com> Subject: Re: TWinSocketStream->Write / Read questions Date: Mon, 6 Jun 2005 10:01:55 -0700 Lines: 32 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: <42a48164$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1118077284 68.69.17.41 (6 Jun 2005 10:01:24 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail