Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Jun : Help to read from port 30003 using indy

www.cryer.info
Managed Newsgroup Archive

Help to read from port 30003 using indy

Subject:Help to read from port 30003 using indy
Posted by:"dogo" (dogo_daz@removeit_msn.com)
Date:Fri, 16 Jun 2006 14:55:41

Hi all,
I'm very new to this so go gentle on me.. I would like to write an app that
connects to port 30003 and receive the data from that port to using in my
own application here are the spec for that port.

The socket outputs the messages on port 30003 in a CSV format, with a
carriage return and lifefeed (ascii 13 followed by ascii 10) at the end of
each message.

How do I go about doing this, I had a go using TClientSocket which does work
but some of the data goes missing, heres the code for that

procedure TForm1.ClientSocket1Read(Sender: TObject; Socket:
TCustomWinSocket);
var
  a, S: string;
  Plane: TstringList;
begin
  s := socket.ReceiveText;
  Memo1.Lines.Add(Socket.ReceiveText);
  a := s;
  setlength(s, 3);
  if s = 'AIR' then
  begin
   // Label1.Caption := a;
    plane := TstringList.Create;
    plane.Delimiter := ',';
    plane.DelimitedText := a;
   // label3.Caption := plane.Strings[4];
    if plane.Strings[4] = Edit1.Text then
    begin
      Memo2.Lines.Add('Found ' + plane.Strings[4] + ' On ' +
Plane.Strings[6] +
        ' at ' + Plane.Strings[7]);
    End;
End;
End;

As I said this is my first time at trying this, so please go gentle on me,

Replies:

www.cryer.info
Managed Newsgroup Archive