Synapse vsVisualTCP and remote host lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- krolikbest · 2020-10-06 18:15 Hi,  on the main form I put vsVisualTCP component in order to receive datas from remote host. If host is ON and is sending something then there is no problem to receive it in vsVisualTCP.OnData event. If host is OFF i get nothing of course but would be nice to know that host is off. Should I do different thread checking host status (on,off) or there is already something ready to use for this purpouse? Regards, ---------------------------------------------------------------------- krolikbest · 2020-10-08 10:34 Solved.It was simply. I used TTCPBlockSocket instead of visual component within thread and checked canRead(timeout).. BTW. I had problems to work with RegisterFileLocation (Windows) in order to use external file with css styles so did a small workaround: - in main form onCreate event: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   // cssCount in public property of main form  cssFile := TStringList.Create;  cssFile.LoadFromFile(css_file_path);  Setlength(cssLine,cssFile.Count);  for i:=0 to cssFile.Count-1 do    cssLine[i]:=cssFile.Strings[i];  cssCount:=i+1;  cssFile.Free;   then in thread of my httpserver in TTestHTTPServer.HandleRequest I put something similar Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ...  with AResponse.Contents do      begin         Add(' ');       Add(' ');         Add(' ');         Add(' ');         Add(' ');         Add(' ');              ...  Thus that is all to use external file with css styles. Regards,