Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Dec : Re: TIdTcpClient / Server and pointer (indy 10)

www.cryer.info
Managed Newsgroup Archive

Re: TIdTcpClient / Server and pointer (indy 10)

Subject:Re: TIdTcpClient / Server and pointer (indy 10)
Posted by:"Dejan Petrovic" (dejanbng@removethis.ztbclan.com)
Date:Mon, 25 Dec 2006 23:12:31

>> ms := TMemoryStream.Create;
>> AContext.Connection.IOHandler.ReadStream(ms, -1, true);//this is received
> ok
>
> No, it is not ok.  You are setting the AReadUntilDisconnect parameter to
> True when it needs to be False instead.  Your code is frozen because it is
> waiting for the client to disconnect from the server before then returning
> the TStream data.
>

I tryed
AContext.Connection.IOHandler.ReadStream(st);

but in this case client raise error :

Socket Error # 10053
Software caused connection abort.

and steam is not received.

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive