Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Feb : Re: Indy 9 TidTCPClient.WriteStream problem

www.cryer.info
Managed Newsgroup Archive

Re: Indy 9 TidTCPClient.WriteStream problem

Subject:Re: Indy 9 TidTCPClient.WriteStream problem
Posted by:"Jamie Dale" (jamie.da..@yahoo.com)
Date:Thu, 28 Feb 2008 13:20:46

What is the size of the file you are sending? - I've had a similar problem
where sending small files seemed to be done instantly but the windows socket
itself was still sending. This isn't an Indy fault (if this is what you are
experiencing) but more one of windows.

Again that is just one scenario but it does ring a bell with problems I've
encountered in the past..

JD

"Tomislav Stamac" <tstamac@vip.hr> wrote in message
news:47c6891a@newsgroups.borland.com...
>
> "Tomislav Stamac" <tstamac@vip.hr> wrote in message
> news:47c672fd@newsgroups.borland.com...
>> >
>>> I suppose that I can copy internal Indy behaviour and send stream like
>>> this:
>>>
>>> Size:=MyProgressStream.Size;
>>> MyProgressStream.OnRead:=DoProgress;
>>> Client.WriteInteger(Size);
>>> Client.WriteBuffer(MyProgressStream.Memory^,size,true);
>>>
>>> Bit It's ugly :), there is Client.WriteStream to do that job.
>>>
>>>
>>>
>>
>> No, that wouldn't work! :)
>>
>> MyProgressStream does not have public Memory property, and even if it
>> does reading directly from memory^
>> wouldn't trigger streams onread method.
>>
>> First of all I would have to copy my stream into a memorystream and pass
>> that ones memory^ to indys writebuffer.
>> Second I would then use Indys OnWork event.
>>
>
> That's not working either, because TIdTCPClient.WriteBuffer ignores
> TidTCPCliend.SendBufferSize. :(((
>
> Any other options?

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive