On 14/03/2016 13:11, Ertan Küçükoğlu wrote:
   if Label2.Caption = 'OK' then begin
     Label3.Caption := 'Connection OK!';

What async means is that the MagIpLog1.StartLogging returns immediately, not after the connection has been established. The component will be trying to establish the connection in another thread but you are already checking if the connection is on with the "if Label2.Caption = 'OK' then begin" line. You have to use the events the component will be firing to check for success/unsuccess of the connection, and proceed sending data from there. In you case, do this from the MagIpLog1LogChangeEvent, using the LogState to know how the connection is going, and when it is OK to send data.
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to