LAMW: Suggestion jTCPSocketClient.java add TimeOut lazarus / 43-Android ---------------------------------------------------------------------- ADiV · 2018-06-21 08:04 @jmpessoa This is the code that I use for when there are connection failures it does not lengthen too much. I usually use timeout = 300ms Code: Java  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i private Socket mSocket; public void Connect(String _serverIP, int _serverPort, int _timeOut) {           SERVER_IP   = _serverIP;         //IP address          SERVER_PORT = _serverPort;       //port number;        Boolean connected = false;           if (mSocket != null) {                try {                                mSocket.close();                              mSocket = null;                          } catch (IOException e) {                                // TODO Auto- generated catch block                                e.printStackTrace();                          }          }           try {                   mSocket = new Socket();                   mSocket.connect( new InetSocketAddress(SERVER_IP, SERVER_PORT), _timeOut);                   connected = true;                  } catch (IOException e) {                          // TODO Auto- generated catch block                      e.printStackTrace();                }           if( connected ){           new TCPSocketClientTask().execute();           controls.pOnTCPSocketClientConnected(pascalObj);          }      } ---------------------------------------------------------------------- jmpessoa · 2018-06-22 15:05 Hi, tr3e! Can you send me your complete "jTCPSocketClient.java" [and Pascal extension...]? Thank you! ---------------------------------------------------------------------- ADiV · 2018-07-05 15:24 Attached full source code. ---------------------------------------------------------------------- jmpessoa · 2018-07-08 19:09 Hi tr3e! The ".rar" file  is damaged... what about some ".zip" ? Thank you! ---------------------------------------------------------------------- silvestre · 2018-07-08 19:34 In my case, I can open it without problems. Attached copy of tr3e in format zip For .rar files it can be used freely https://www.izarc.org/ Quote from: jmpessoa on July 08, 2018, 09:09:40 pmHi tr3e! The ".rar" file  is damaged... what about some ".zip" ? Thank you! ---------------------------------------------------------------------- jmpessoa · 2018-07-08 19:46 Hi,  silvestre! The .zip is ok!! Thank you! [edited]  Commited!!! Thanks to All!