Article View: borland.public.cppbuilder.internet.socket
Article #4247TCustomWinSocket Question!!!
From: qyte
Date: Wed, 09 Mar 2005 08:58
Date: Wed, 09 Mar 2005 08:58
20 lines
1400 bytes
1400 bytes
I am writing the following code:
bytes=fread(fileread,1,65536,f);
tmpsent=fileread;
int nsent;
while (bytes)
{
ready=false;
nsent=Socket->SendBuf(tempsent,bytes);
if(nsent<0) continue;
if(nsent<bytes) ShowMessage(AnsiString(nsent));
bytes-=nsent;
tempsent+=nsent;
}
the problem is that i always send bytes.
The ShowMessage is never displayed. What is wrong
and whenever i use sendbuf either the whole packet will be sent
or none at all.
the socket is non-blocking.
Technical Details
Message-ID:
<422ebaa9@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!tiscali!newsfeed1.ip.tiscali.net!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,9d542e3e01c45d6,start X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Wed, 09 Mar 2005 10:58:16 +0200 From: qyte <gyte@vivodinet.gr> User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.socket Subject: TCustomWinSocket Question!!! Content-Type: text/plain; charset=ISO-8859-7; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 83.171.210.195 Message-ID: <422ebaa9@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1110358697 83.171.210.195 (9 Mar 2005 00:58:17 -0800) Lines: 20 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail