Thread: text forwarding

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2004
    Posts
    24
    Rep Power
    0

    text forwarding


    Hi Everyone!
    this mis my code:
    procedure TForm1.IdTCPServer1Execute(AThread: TIdPeerThread);
    var
    Msg : string;
    begin
    while AThread.Connection.Connected do
    begin
    Msg := AThread.Connection.ReadLn;
    if
    (UpperCase(Msg) = 'QUIT') or (UpperCase(Msg) = 'BYE') then
    AThread.Connection.Disconnect
    else
    AddLog('Leggi in: ' + Msg);
    IdTCPClient1.Socket.??(Msg);
    AThread.Connection.WriteLn;
    end;
    end;

    The question is:which option I have to use to forward the string Msg(something like ".Socket.SendText" in delphi6 tcpclient socket)??

    thank you!!
    Christian
    Thank
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2004
    Posts
    24
    Rep Power
    0

    post scriptum


    Hi Guys!!
    I didn't write that I'm working with delphi7, and I'm looking for an aextension of the IdTCPClient socket similar to the sendtext command in delphi6's client socket!!
    Thank you!!
  4. #3
  5. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,638
    Rep Power
    4247
    IdTCPClient has a method called Write, which is what you're looking for.
    IdTCPClient1.Write(Msg);
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo

IMN logo majestic logo threadwatch logo seochat tools logo