>> And the quest goes on.................. >> >> I've spent the weekend trying to workout how to capture data from a port >> using everything I can think off. >> >> I surfed the net for hours looking for answers and everything tells me that >> the code below should >> work........I've tryed Delphi Sockets, Indy Sockets and the Indy Telnet >> component and nothing. >> >> >> >> procedure TForm1.Button1Click(Sender: TObject); >> begin >> with IndyClient do begin >> Host := '192.168.1.2'; // Host to call >> Port := 4001; // Port to call the server on >> Connect; Try >> ListBox1.Items.Add(Readln); >> //End; >> finally Disconnect; end; >> end; >> >> Can anyone out there help. >> >> This is getting on my last nerve.....HELP!
Hi Jerry, I came a little late to the game on this one. Not to perhaps re-ask the obvious, but you do realise that the ReadLn() method is going to wait (probably indefinitely) until it receives a Carriage-Return and/or Line-Feed before it actually puts anything in your listbox? I don't have access to my delphi and indy right now, but off the top of my head, i surely seem to remember a Read() or ReadBuf() or ReadBuffer() or something similar method that might be better suited? That way you can at least tell it to dump however many bytes you asked it to read into wherever you need it to go. Sorry I can't be of more assistance right now, but I saw your question in passing and thought a couple of pointers might help. Good luck with it! :) John. _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

