[SOLVED]Lnet's LTCPComponent.Connect() the result always is True lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- lyink · 2014-03-23 15:02 Hi everyone. I was wrote a  ChatClient with Lnet's LTCPComponent. and i found out the Connect() function is always return True,Whether the server has no open。 test like: Code: [Select]procedure TForm1.Button1Click(Sender: TObject); begin   if LTCPComponent1.Connect('127.0.0.1',random(5000)) then   begin     caption:='is Connected';   end; end;  Can you make a suggestion for me? which networking component is easy to use and stable. thanks! ---------------------------------------------------------------------- bambamns · 2014-03-24 02:34 Hi, LNet is very stable - I use it on many different project, platforms and devices for many years. LTCPComponent1.Connect is to make connection, but if you wont to check connection try to use LTCPComponent1.Connected. In TCP/IP connection you have to wait for server/client "handshaking" , so make an loop (while .... do) for a second , or two and then check if connection is connected. You can use some other events like OnConnect or OnAccept. More details on http://lnet.wordpress.com/usage/usage-guide/. ---------------------------------------------------------------------- lyink · 2014-03-24 12:51 Quote from: bambamns on March 24, 2014, 03:34:19 amHi, LNet is very stable - I use it on many different project, platforms and devices for many years. LTCPComponent1.Connect is to make connection, but if you wont to check connection try to use LTCPComponent1.Connected. In TCP/IP connection you have to wait for server/client "handshaking" , so make an loop (while .... do) for a second , or two and then check if connection is connected. You can use some other events like OnConnect or OnAccept. More details on http://lnet.wordpress.com/usage/usage-guide/. Thanks for you answer,It's my falut. i was misunderstoode Lnet.