Jump to content

dummzeuch

Members
  • Content Count

    2952
  • Joined

  • Last visited

  • Days Won

    106

Everything posted by dummzeuch

  1. But you can easily check for nil, while that's not possible for "uninitialized". And you can also easily spot them in the debugger. Also, referencing a non-initialized object reference does not necessarily result in an access violation, while referencing nil definitely does.
  2. dummzeuch

    ssh tunnel with ssh-pascal

    Hm, I must have broken something. It compiles, but it doesn't work at all. I'll have a closer look later.
  3. dummzeuch

    Buying a mini pc to install Delphi

    There is also Mouse Without Borders, now part of Windows Power Toys, which has a similar functionality, but is Windows only. But as Alberto just clarified: He needs a different functionality, so this won't help. Regarding KVM switches: I found them a bit too pricey for just a convenience so I do the same as Anders and use the multiple input ports of my monitor(s) to connect my computers and switch between them using the monitor's on screen menu. My keyboard has two USB ports so I connect the mouse to the keyboard and just need to plug in the keyboard's USB cable into the computer I am currently using. (A separate USB hub would offer the same "convenience" at much less cost than a KVM switch). Also, I can have one of my monitors show the display of one computer and the other the display of the second one, if I need that. I don't know whether KVM switches allow that nowadays. Of course that always depends on the use case: If you want to switch frequently, a KVM switch may be worthwhile. But then maybe Remote Desktop or Synergy / Mouse Without Borders could be a better solution.
  4. dummzeuch

    12.2 Instability

    I can understand why you do that, but it kind of defeats the purpose of a form designer. I hope you filed bug reports for the offending components.
  5. dummzeuch

    ssh tunnel with ssh-pascal

    I'll test your changes as soon as I am awake properly and had breakfast. edit: It seems to work. I can connect to the web server using multiple browser instances sequentially without restarting the LocalForward demo. I haven't looked at the code yet. I'll try to change my Remote Desktop forwarding tool to use your new code. edit: Nope, doesn't work. After logon, while the Remote Desktop confirmation dialog is being shown An exception "Windows socket error: An existing connection was forcibly closed by the remote host (10054), API 'recv'" occurs in SshTunnel, Line 170, which aborts the listening the thread. Afterwards of course no further connections are being accepted. A web server has multiple connections on the same port, doesn't it? So does ssh itself. Or a database server. A simple use case would be if you want to test some page on a web server using different browsers in parallel.
  6. dummzeuch

    ssh tunnel with ssh-pascal

    @pyscripter see my latest pull request for some helpful debug output options This currently requires a hack using TMethod because LocalForward.Main is not an object. Would it be OK, if I made it a method of a TLocalForward object and create that in the Main procedure?
  7. dummzeuch

    ssh tunnel with ssh-pascal

    I just tried sshexec on my home Linux "server" and it worked now. It also automatically took my ssh key from Pageant. Hm, I just tried to simply request a web page through the tunnel twice in a row, but apparently the browser keeps the connection open even if I close that tab. I had to wait for a timeout. for a request to fail. But closing the whole browser window rather than just the tab worked. The connection will be closed and when retrying in a new window the request will fail.
  8. dummzeuch

    ssh tunnel with ssh-pascal

    I used 3 different branches, but I guess the mistake was merging those changes into my master branch and creating new branches for the other changes from my master branch which already contained the changes from the first branch. I'll try it differently next time. Thanks for merging.
  9. dummzeuch

    ssh tunnel with ssh-pascal

    I have submitted 3 pull requests (none solving that problem yet), but I have been doing something wrong: The branches from which I created the pull requests contain more commits than expected.
  10. dummzeuch

    ssh tunnel with ssh-pascal

    I can't promise anything, but if I get it to work, I'll submit one.
  11. dummzeuch

    ssh tunnel with ssh-pascal

    Basically the problem I am facing here is the same as issue#11 reported on GitHub, only that I have two connections one after another and the person who opened that issue has them in parallel. And that's rather difficult to fix based on the current structure because TSshTunnel.ForwardLocalPort is executed completely in one thread. In order for this to work, there must be one thread that calls select on ListenSock and then starts another thread whenever there is a connection to the socket and let that thread handle the forwarding from it until that connection is closed. The original thread must then again call select on ListenSock. This would handle multiple connections serially and in parallel.
  12. dummzeuch

    ssh tunnel with ssh-pascal

    Turns out that reading from the local socked returned an error with error code 10054 "An existing connection was forcibly closed by the remote host" and raised an ESocketError exception. I never saw that exception because I had disabled the exception notification for this exception type in the debugger (because it happens every few seconds when debugging a IDE plugin without connection to the elc server). So I figured that the remote desktop client closes the socket after login and then tries to open a new connection, but since the thread exits after that exception it cannot connect. And guess what: I just restarted the program again before clicking "Yes" and I've got a working remote desktop session now. So the solution in this case is to start listening for a connection again after the previous one was closed. I'll try that later.
  13. It would indeed slow down the code. But I doubt that it would make much of a difference nowadays except under very special circumstances..
  14. dummzeuch

    ssh tunnel with ssh-pascal

    The original code calls SetScokOpt before bind. Your code does it the other way round. Not sure whether that makes any difference either.
  15. dummzeuch

    ssh tunnel with ssh-pascal

    That C++ example does not use a separate thread as far as I can see. Not sure whether that makes any difference.
  16. dummzeuch

    ssh tunnel with ssh-pascal

    Unfortunately the problem persists. I'll have a deeper look into it later. Thanks a lot.
  17. Including a full unit will definitely work, as long as it contains ifdefs that hide parts of it from the compiler. I have used this trick for many years to create pseudo templates long before Delphi had generics. The linked blog post explains it in depth.
  18. You could use includes from different units for testing. Lets say this is the unit you want to test: {$IFNDEF UNIT_TESTING} unit ToTest; interface uses Whateever, isNecesssary; function AlwaysAvailable(): TSomeType; function NotAlwaysAvaialble(): TSomeOtherType; implementation uses Other, Units; {$ENDIF} function AlwaysAvailable(): TSomeType; begin // implementation here end; {$IFDEF USE_EVERYTHING} function NotAlwaysAvaialble(): TSomeOtherType; begin // implementation here end; {$ENDIF} {$IFNDEF UNIT_TESTING} end. {$ENDIF} Instead of directly using this unit in the unit tests, you use two (or more) different units that include that unit, e.g.: unit UnitForTesting1; interface uses Whateever, isNecesssary; function AlwaysAvailable(): TSomeType; function NotAlwaysAvaialble(): TSomeOtherType; implementation uses Other, Units; implementation {$DEFINE UNIT_TESTING} {$DEFINE USE_EVERYTHING} {$I 'ToTest'} end. and unit UnitForTesting2; interface uses Whateever, isNecesssary; function AlwaysAvailable(): TSomeType; implementation uses Other, Units; implementation {$DEFINE UNIT_TESTING} {$I 'ToTest'} end. I haven't tested this, but it should work. On the other hand, this makes the testing code quite confusing and might lead to code not being tested as intended.
  19. @Jim McKeeth has updated the GExperts documentation a bit. It’s far from finished but that’s better than the totally outdated one on gexperts.org. I have now exported it as webhelp and checked it in to subversion. You can read it at my newly created domain help.gexperts.de. (The domain is temporary only for now. I got it cheap but I’m not sure I will keep it.)
  20. dummzeuch

    Updated Webhelp for GExperts available

    Thanks, fixed. The forum software inserted that link automatically and when I changed the text the link didn't get updated.
  21. dummzeuch

    Updated Webhelp for GExperts available

    new download link https://svn.code.sf.net/p/gexperts/code/trunk/Binaries/GExperts.chm @Ian Branch open file properties and select "unblock".
  22. dummzeuch

    Updated Webhelp for GExperts available

    Hm, interesting. I found no way to actually configure this in Help and Manual. But when resetting some options to the default, this line was inserted automatically. Previously there was a line <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> Which I could also find nowhere. It was probably inserted automatically. I have just committed a new .chm file. Try if it works for you.
  23. dummzeuch

    Updated Webhelp for GExperts available

    Works fine here: I downloaded the file form that link, saved it to the default download folder and opened it with a double click. I got two warnings regarding "unsafe" file from the internet and then it simply showed its content. Since I have no idea how these files/the viewer works, I can't say what the problem on your side might be.
  24. dummzeuch

    Updated Webhelp for GExperts available

    Unfortunately I just found that Webhelp as single export and Webhelp as part of a batch export are different. No idea why.
  25. dummzeuch

    Updated Webhelp for GExperts available

    https://svn.code.sf.net/p/gexperts/code/trunk/Documentation/GExperts.chm
×