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:17:18

I remember once having a very similar problem to this months ago and the
solution was quite easy once I figured out where I was going wrong...

Have you reset the stream position before using writestream()?


"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:

none

In response to:

www.cryer.info
Managed Newsgroup Archive