RemObjects: How to prevent UI from freezing when making unsuccessful TCP/IP connection?

208 Views Asked by At

I am testing my program TCP/IP connection which uses RemObjects TcpClient and TcpServer controls and running into an issue.

If the host or remote server is not listening for connection, then client just simply freezes in trying to make remote connection and eventually crashes.

SignalClient.ConnectNew(LocalIPEdit.Text,Int32.Parse(ClientPort.Text));

Is there any way to prevent that and still give control to the user?

1

There are 1 best solutions below

0
Carlo Kok On

Using a thread (or task) is the easiest way. You can disable controls around the start/finish of this.