Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Jun : Re: IdTCPServer

www.cryer.info
Managed Newsgroup Archive

Re: IdTCPServer

Subject:Re: IdTCPServer
Posted by:"brandon" (someo..@microsoft.com)
Date:Fri, 16 Jun 2006 14:08:59

Any provision for sending a Stream or Binary Transfer? >> Hence my earlier
statement about TPersistent

If so how 'bout a sample. What I am thinking would be :
  Create TSomeObject = class( TPersistent )
     public
        blah,
        blah,
        blah

(This is not actual code, only enough of a framework to convey my idea...)
procedure GetObjectFromMyThread(TSomeObject)
var
  str: TMemoryStream; //???
begin
   str :=  TIdTCPClient.***READ THE OBJECT FROM STREAM?**
   TSomeObject.LoadFromStream Str ...
end;

procedure SendObjectToThread(Sender)
var
  str: TMemoryStream;
begin
   FMyObject.SaveToStream(str);
  TIdTCPClient.***SEND THE OBJECT UP VIA STREAM***
end;


"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message
news:4492f0ce$1@newsgroups.borland.com...
>
> "brandon" <someone@microsoft.com> wrote in message
> news:4492edd7$1@newsgroups.borland.com...
>
>> To clarify, the server has a TMyPeerThread(AThread).Data property.
>> Can the client set or read the .Data Property
>
> No.
>
>> or is it only set / read from the server?
>
> Yes.
>
>> If TMyPeerThread(AThread).Data is a TClientDataSet, can I access
>> the data from  TClientDataSet(TIdTCPClient.???).FieldByName(.....
>
> No.  The client would have to send a command to the server asking for the
> data, and the server would then access the TClientDataSet, format the data
> as needed, and send it back to the client.
>
>
> Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive