Jump to content

Angus Robertson

Members
  • Content Count

    1702
  • Joined

  • Last visited

  • Days Won

    32

Posts posted by Angus Robertson


  1. I had Delphi 11.3 and 12.0 installed together for a week, Parnassus only installed in 11.3, no problems.

     

    But when I updated the license key for 12.0 yesterday, 11,3 stopped working.  So I guess Parnassus has screwed me as well.  

     

    Parnassus only works with a subscription license key, not beta keys, which is why the problem did not show up earlier.  Annoying.

     

    Angus

     


  2. The ICS TSslHttpRest component now has proper support for multipart/form-data parameters, using TRestParams, available in SVN and the overnight zip.  There is a new content type for FormData

    and a new method AddItemFile that allows one or more files to be added as parameters. 

     

    The  OverbyteIcsSnippets sample has two new HTTP file uploads buttons, one doing a simple file upload, the second a form-data upload, which set-ups the parameters as follows:

     

    MyJsonParams := TRestParams.Create(self);
    MyJsonParams.PContent := PContJson;
    MyJsonParams.AddItem('FileTitle', mytitle);
    MyJsonParams.AddItem('FileName', myfile);
    SslHttpRest.RestParams.PContent := PContFormData;
    SslHttpRest.RestParams.AddItem('FileTitle', mytitle);
    SslHttpRest.RestParams.AddItemA('JsonBlock', MyJsonParams.GetParameters, true);
    SslHttpRest.RestParams.AddItemFile('FileName', mysrcfile, 0);  
    SslHttpRest.RestParams.AddItem('Submit', 'SubmitFile');
    SslHttpRest.HttpUploadStrat := HttpUploadNone;  
    StatCode := SslHttpRest.RestRequest(httpPOST, myurl, False, '');  

     

    This part was relatively straight forward, but testing proved interesting, particularly with an 8Gbyte file.  The ICS application web server read uploaded data in a memory buffer, so that was changed for file stream above a certain size, likewise TRestParams needed a file stream for size.  Then our form handling code needed updating for character sets as recommended by the latest RFC with a new parameter display web page in the ICS web server samples for testing.  

     

    So a long process, but much improved REST functionality.

     

    Angus

     

    • Like 1

  3. Further to the announcement of RAD Studio 12.0 Athens today, ICS V9.,0 already has packages to install on Delphi 12, and is available now from GetIt. 

     

    If installing VCL only manually, the overnight zip has a new D12InstallVcl.groupproj that replaces the old D12Install.groupproj, or use the existing combined D12InstallVclFmx.groupproj and just don't install the FMX packages (which is exactly what the new group does).  

     

    This change will be made for all compilers for V9.1 and will remove a lot of VCL only packages that are a pain to maintain. 

     

    Angus

     


  4. Quote

    And how do you think the server would address those parameters?

    The server can enumerate the parameters sequentially, rather than by accessing them by name, I just added a function to ICS to do exactly that, for diagnostic purposes.

     

    But comma separated values could be used as an array.  It all depends on what the server expects, and it may not follow normal standards. 

     

    Angus

     


  5. I would recommend you upgrade to the latest ICS V9.0, there were a number of fixes relating to objects not being freed after exceptions, lots of clean-up, particularly for Win64 servers. 

     

    There is no general problem with the ICS web server crashing, the following is from the status page of one of my public ICS web servers, doing SQL queries, REST requests and standard web pages, it just keeps running, until time for Windows Update or a new version:

     

    WSocket: TWSocket (c) 1996-2023 Francois Piette V9.1
    Server: THttpServer (c) 1999-2023 F. Piette V9.0
    Windows Boot Time: 10-Oct-2023 21:54:24
    WebAppTelecom Start Time: 10-Oct-2023 22:54:27
    Server OS: Windows Server 2019 Standard 1809 Win64 10.0.17763
    Compiler: Delphi 11.3 Win64
    OpenSSL Version: Static OpenSSL 3.0.11 19 Sep 2023, Legacy Provider Loaded OK
    SQL Requests: 49,572
    Total Requests: 104,933
    Total Connections: 117,470
    Max Simultaneous Connections: 60
    Total Data Received: 73.7M
    Total Data Transmitted: 3.03G
     

    Angus

     

     


  6. Look at the new OverbyteNetTools sample, the LAN Devices tab scans the LAN for devices in various ways and shows the MAC vendor, often useful for identifying all those IoT devices that our LAN seem to accumulate, often announcing themselves as Amazon or Google, NEST, Tuya, Espressif, and others, just on my LAN. For reasons unknown, they sometimes change MAC address to something random and back again. 

     

    Angus

     


  7. 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

     

     


  8. 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

     


  9. 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

     

     

     


  10. 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

     


  11. 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

     


  12. 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

     


  13. 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

  14. 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

     


  15. > 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

     

     

×