Jump to content

Angus Robertson

Members
  • Content Count

    2070
  • Joined

  • Last visited

  • Days Won

    38

Posts posted by Angus Robertson


  1. I can not trace route ptbtime1.ptb.de (192.53.103.108) from the UK, no response to any hops beyond my ISP. 

     

    The time client does seem unhappy with IPv6 time servers, it's failing on all the Google IPv6 addresses before trying the IPv4 ones and working.  Ditto Cloudfare, will check later in the week.

     

    I mostly use time.cloudflare.com now, well distributed around the world, but not Google.  But Facebook and Apple also have distributed servers, all are better than the random addresses that come back for ?.ntp.org.

     

    Angus

     

     


  2. If you get an exception in that function, your application has probably already freed the client, although the exception should have happened a few lines higher.  But it could also be memory corruption.

     

    If you have recently converted your application from Delphi 7 AnsiStrings to Unicode, I would look very carefully at all your string handling for received data. 

     

    Angus

     


  3. Thanks for the information, but you have not explained what the clients are doing.  And I'm still confused as to why you think clients being disconnected when idle is a bad thing, that is the design. 

     

    If you want idle clients to remain connected, set long KeepAlive timeouts, several hours.  Zero for no disconnect is not documented as a design feature., 

     

    The ICS web server is well tested over 20 years, in use on many public web servers, including my own.

     

    Angus

     

     

     


  4. I'd like to know for what purpose you are using the ICS web server, what application, and why you are trying to disable server timeouts with

     

    WebServerSSL.KeepAliveTimeSec := 0;
    WebServerSSL.KeepAliveTimeXferSec := 0;

     

    Web servers are not supposed to keep idle connections opens unless keep-alive is requested.   The Heartbeat timer should ignore zero timeouts, but I've never tested it, since no-one needs that feature.

     

    Also, you sometimes mention the connection being closed, sometimes the web server, which seems highly unlikely. 

     

    Angus

     


  5. Has anyone looked at the Google RBM (Rich Business Messaging) APIs, used for the SMS replacement RCS Chats that seems to be appearing on all our phones?  Personally, I'd missed it, just use Whatsapp. 

     

    Not sure if RBM is the same as RCS, don't really follow mobile trends... 

     

    But receiving and sending RCS from my desktop without needing to forward SMS would seem useful.

     

    Angus

     


  6. Quote

    all my base visual components are based on the TNT Unicode library

    I had to remove a lot of TNT components during my conversions.   I would start your conversion in Delphi 7, made sure all your forms are saved as text, then use a text editor to globally replace TNT components one form at a time in PAS and DFM, with standard VCL versions, so it builds, but won't run properly.  Then open in a modern compiler.  Maybe change WideString to UnicodeString, or perhaps you have an alias already. 

     

    Angus

     


  7. Over the last two years, I've converting Delphi 2007 applications to modern compilers.  Not finished yet.

     

    Apart from all the other comments made, a couple of my own.

     

    Avoid the simple solution of using AnsiString, you will end up with thousands of compiler cast warning and have trouble with functions that use UnicodeString.  Use TBytes for non-string data, there are lots of ways of converting TB to other formats

     

    Look at file handling carefully, loading a text file into a TStringList will result in Chinese as it assumes it's reading unicode, unless it finds a BOM or is told otherwise, ditto saving files.

     

    Angus

     

    • Like 1

  8. You are looking at a low level component where you'd need to code all that stuff yourself. 

     

    Please use TIcsFtpMulti instead, which reads directories automatically and downloads or uploads multiple files with a single function call.  The main sample is OverbyteIcsXferTst, but there also is a very simple sample in OverbyteIcsSnippets where you can press a button to download sample files. 

     

    Angus

     


  9. > ICS can not start, because some necessary SSL DLLs are missing.

     

    Because you failed to distribute all the required files with your prorgram.

     

    > ICS is trying to download those DLLs from a non-SSL server via http://... , but can not !!!

     

    Because you told the ICS application you designed to do an impossible download.  Bad program design. 

     

    Before distributing applications to hundreds of PCs, I find a little testing helps.

     

    Angus

     

     


  10. You don't download OpenSSL using ICS, you use a normal browser. 

     

    But you already have OpenSSL, it is also distributed as part of ICS, in the openssl folder, and the DLLs are also in the sslsamples folder so all the ICS samples work. 

     

    You just have to make sure the DLLs are in the same folder as your exe, unless you specify a different folder in code. 

     

    Angus


  11. The websocket protocol has a keep-alive feature, if data is not being sent regularly, it is designed to be kept open.  ICS does this for websocket client and server.  

     

    ICS is quite capable of keeping sockets open for hours, but unless there is some traffic external routers and caches may decide the connection is dead and close it, I had to fix an FTP control channel issue where it was unexpectedly closed after a two hour upload of 50GB, needed to send keep-alives.  That was annoying and time consuming, the 50GB uploads worked, but because the control channel was dead were considered failed.

     

    But here we are talking about a simple web server, the HTTP protocol allows keep-alive connections usually closing after a couple of idle minutes, I'm not aware it allows hours long connections without any traffic, and certainly the ICS web server is not designed or tested for that concept.

     

    Angus

     


  12. I see a project, without any explanation of what you are trying to achieve or how to use it. 

     

    You have previously mentioned holding open client sessions for long periods, without saying how or why you are trying to do this. Web servers don't hold open connections. 

     

    Then the server itself closing when a client closes? 

     

    Sorry, without details, I can not investigate anything.    

     

    Angus


  13. Thanks, I've made the change in my copy, but it won't be in SVN for several days until I see if it breaks anything. 

     

    Generally, applications use specific events like onSessionConnected, Closed, etc to check for errors, rather than the State changing.  But if this change proves not to be backward compatible, it will be reverted.

     

    ICS itself does not use the OnChangeState event, except for when a server starts listening. 

     

    Angus

     


  14. I've got a twin Dymo label writer, and still use the v8 label software, I have a setup file dated 2014 (113M) if you want to install the old version. 

     

    But never tried to use it from Delphi, not aware type libraries have changed, that sort of stuff tends to be stagnant in terms of development. 

     

    Hardly use the Dymo now, was excellent for printing postage stamps in the UK, but that service ceased years ago, as did using the post in general.

     

    Angus

     


  15. You are using an old version of ICS, all gettickcount functions now use Int64. 

     

        FConnectTick  : Int64;       { V8.71 changed from cardinal to Int64 }
        FLastRecvTick : Int64;       { V8.71 }
        FLastSendTick : Int64;       { V8.71 }

     

    ICS has supported In64 ticks on all Windows platforms since 2009 using the OverbyteIcsTicks64 unit which uses QueryPerformanceCounter for ancient operating systems, although Cardinal ticks were only fully removed for the latest release. 

     

    Angus

     

×