Jump to content

FPiette

Members
  • Content Count

    1120
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by FPiette

  1. Can you confirm if IntraWeb has a message pump? To check, use Classes.AllocateHWnd to create a hidden window handle and attache a WndProc to it. Then from a button in your user interface, PostMessage a message to that window handle and from the WndProc, check if the message is received. First check in a normal VCL application to be sure you understand how it works. Then check within an IntraWeb application.
  2. FPiette

    New install

    Forget about D7! Try with recent Delphi version. Community Edition is free (Commercial use has some restrictions) and good.
  3. Which IntraWeb version are you using ?
  4. I have zero knowledge about IntraWeb but I call tell you the requirement for ICS : You need a message pump to have the events triggered. If IntraWeb lacks a message pump, you may pump all your ICS stuff within a single thread having his own message pump.
  5. FPiette

    Fmx component in VCL ?

    Not directly supported, but solutions exists. I don't recommend mixing VCL and FMX.
  6. FPiette

    Comport Serial Port help

    Should be: A := StrToInt ('$' + Result1);
  7. FPiette

    Bug - Linux 64 Compiled

    This question is worth a specific publication. Please post it with a proper subject.
  8. FPiette

    Bug - Linux 64 Compiled

    Long time ago, back in 2005, I implemented ICS for Linux. This was at the time of Kylix. The latest version was named "ICS for Kylix 3". Of course this code won't work with current Delphi but AFAIK the system calls I made for the message loop are still compatible with current Linux. The source code is still available from "ICS" page at my website http://www.overbyte.be. The message pump stuff has to be implemented to TIcsWndControl class which did not exist at Kylix 3 time. For the story : I implemented ICS for Kylix in the hope of having business in the Linux world. That was a total failure because at that time, all Linux user wanted everything without paying anything. If anyone (probably a group) has funds to sponsor development for Linux I'll be pleased to do it. That's how ICS for SSL was developed. The person having paid at least 100€ had immediate access to the code. The code was made free one year after ICS for SSL was ready.
  9. Those steps are correct. Remember the the receive side must know how many data to receive. You will likely receive several OnDataAvailable for significant amount of data. There is NEVER guaranteed relation between the number of Send() and the number of OnDataAvailable events. This is the biggest error many newbies are doing constantly. Be sure to read this documentation : http://wiki.overbyte.eu/wiki/index.php/Asynchronous_Paradigm
  10. Your 3 connections have unique couple local IP and local port. That remains valid while the connection stay opened. On the next connection, the local IP will change. Thats' all you have on the network layer. You should probably design something in your communication protocol to identify a given connection. In HTTP implementation, it is common to use a cookie. That is small data sent by the server upon connection and sent back by the client with each subsequent send. Designing your own (reliable) protocol requires advanced knowledge about TCP/IP and communication protocol.
  11. FPiette

    ICS and MemoryStreamToString

    > WSocket1.SendStr('<|START|>' + MemoryStreamToString(MyStream) + '<|END|>'); You should split this in 3 sends, you'll avoid the costly operation that concatenates the 3 string and the operation of converting the stream to string. WSocket1.SendStr(<|START|>'); WSocket1.Send(MyStream.Memory, MyStream.Size); WSocket1.SendStr( '<|END|>'); I urge you to carefully read those documentations, in that order: http://wiki.overbyte.eu/wiki/index.php/Asynchronous_Paradigm http://wiki.overbyte.eu/wiki/index.php/Sending_and_receiving_data
  12. FPiette

    Comport Serial Port help

    By the way, there are lots of serial component which are free and include full source code. Or commercial products with good documentation.
  13. FPiette

    Comport Serial Port help

    Using ReadByte you can read 24 bits from the UART, probably as 32 bits padded with zeros. You can build a 32 bits signed integer with that. Delphi compiler use 2's complement. You didn't answered my question: What does the string looks like ?
  14. FPiette

    Comport Serial Port help

    What looks the string like ? Does the component have a ReadByte function ?
  15. FPiette

    Comport Serial Port help

    Please show the code you are currently using.
  16. FPiette

    Memo get real-time output

    You should explain what you want to do, what is the problem in your code and which part you don't know how to do.
  17. I didn't. If you are interested, my application is there: https://github.com/fpiette/OvbImgOrganizer
  18. This is the way to send the content of the stream. But you have a problem for the receiver: how will the receiver know the length of the stream? It would be OK if this is the only thing sent for the whole session. Not a very good design. You should probably first send an integer with the stream size and then the stream content. The receiver will then first receive the length and then know how many byte it has to receive for the content. Also, you don't need to decode the JPEG before sending. Just load the file into the memory stream. The receiver will decode the JPEG. This will result in much less data sent thru the network. I don't know why you want to send the image using a bare socket. Bette to use a higher level component such as HTTP of FTP. Since you have not explained your whole problem, I cannot help you more.
  19. You could use a database transaction. Begin the transaction before printing and commit the transaction after printing. Roll the transaction back if printing failed. If a program crash occurs while printing or before the program crashes, the transaction will automatically rolled back.
  20. Hello! I have the need to profile my application to find a performance bottleneck. This 32 bit application written in Delphi 11 is using IXmlDoc to read a GPX file and build an equivalent Delphi class hierarchy. This process look abnormally long. This could comes from IXmlDoc which is not the fastest XML parser, or from the code I wrote. I hope that using a profiler I will discover where the issue lies. So I searched the web and found several products. Among them I found GpProfile2017 (https://github.com/ase379/gpprofile2017) which is open source and still maintained. Before jumping to this project, I would like to know if someone has some experience to share. Thanks.
  21. FPiette

    Delphi profiler

    To keep you up-to-date, I have modified my code to use OmniXML that is delivered with Delphi 11 (unit Xml.Internal.OmniXML) and to use a record instead of a class for the most used data structure. The net result is a speed increase by a factor of 10 (Ten!) on a large GPX file. If time permit, I will give a try to neslib.xml.
  22. For your information, HTTP is based on TCP as many other high level protocols such as FTP, SMTP, POP3 and more. You are right that the HTTP proxy will only work for HTTP. Maybe you can have a look at it to understand how it works? Or you have to study how TIcsProxy: you have full source code.
  23. Did you read the explanation that is in TIcsProxy source code ?
  24. FPiette

    Delphi profiler

    I did not know! And this looks very promising. Thanks a lot.
×