Article View: borland.public.cppbuilder.internet.socket
Article #2828Re: TCP Client / Server
From: Margreiter
Date: Sun, 22 Jan 2006 16:22
Date: Sun, 22 Jan 2006 16:22
28 lines
1965 bytes
1965 bytes
> That is what the OnWork events are for. But you did not show where they
> are
> being assigned, or what their code looks like.
I tried to get the information in th OnWork event:
void __fastcall TForm1::TCPDataClientWork(TObject *Sender,
TWorkMode AWorkMode, const int AWorkCount)
{
StatusBar1->SimpleText = AnsiString(AWorkCount);
}
but this event is never fired.
Do I have to assign or to initialize these events somewhere earlier?
> Why are you loading the entire file into memory before sending it? If you
> use a TFileStream instead, then you can send the file directly
>
> TFileStream* strm = new TFileStream(SPath, fmOpenRead |
> fmShareDenyWrite);
> ...
> Form1->TCPDataClient->WriteStream(strm, true, true, 0);
> ...
I did not realize this function.
thank you
Johann
Technical Details
Message-ID:
<43d3afc5@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news3.google.com!news.glorb.com!news.erinye.com!news-out.superfeed.net!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<43c8dfc3@newsgroups.borland.com> <43cd4ccc$1@newsgroups.borland.com> <43cf4937@newsgroups.borland.com> <43cf5359$1@newsgroups.borland.com> <43cf64ce$1@newsgroups.borland.com> <43cfd1f5$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,c2aaeb47b5011605 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Margreiter" <ma@soft-hard-ware.at> Newsgroups: borland.public.cppbuilder.internet.socket References: <43c8dfc3@newsgroups.borland.com> <43cd4ccc$1@newsgroups.borland.com> <43cf4937@newsgroups.borland.com> <43cf5359$1@newsgroups.borland.com> <43cf64ce$1@newsgroups.borland.com> <43cfd1f5$1@newsgroups.borland.com> Subject: Re: TCP Client / Server Date: Sun, 22 Jan 2006 17:22:26 +0100 Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 83.65.218.249 Message-ID: <43d3afc5@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1137946565 83.65.218.249 (22 Jan 2006 08:16:05 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news3.google.com!news.glorb.com!news.erinye.com!news-out.superfeed.net!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail