Jump to content

Fr0sT.Brutal

Members
  • Content Count

    2268
  • Joined

  • Last visited

  • Days Won

    46

Everything posted by Fr0sT.Brutal

  1. Fr0sT.Brutal

    Best components for creating windows service apps

    Am I the one who doesn't see download link on that page?
  2. Fr0sT.Brutal

    SChannel TLS - perform TLS communication with WinAPI

    Hmm, this is possible though I tried to keep close to classic feature set. Exception is for Default() use, I like it so much I can't return to ugly FillChar. That's weird. Could you post log? I have no problems requesting GET / from google. Well, that's philosophic question. I hate tons of DLLs around my app; if OpenSLL could be compiled statically I'd prefer this option. But this requires too much C++ kung-fu to build them static and much more cross-compiler-fu to make Delphi eat these obj-s. I don't brave enough to start this battle. Anyway, f.ex., cURL uses SChannel by default. Thanks, I'll have a look. Thanks, I'll have a look. My functions could be bound with ANY socket lib - Indy, Synapse, etc, even inter-process pipes. Anyway my purpose was to make TLS-enabled my app that uses ICS.
  3. Hi all, spent some time just now on investigating a weird bug, it happened to be a memory AV that wasn't reported or caught by my exception handlers. Finally I came to see TCustomWSocket.ASyncReceive which appeared to just silently swallow any exceptions that happen in TriggerDataAvailable. I suppose it should have HandleBackGroundException(E) shouldn't it? Ver.: 8.58 File: OverbyteIcsWSocket.pas Line: 8427
  4. Well, it's always better if no exceptions happen at all but the world isn't perfect )))
  5. Angus, just found that `bMore := FALSE` is still necessary... HandleBackGroundException calls OnException and stuff, then Abort is called, then socket is closed and then all these nested calls finish and... "while bMore do" loop continues :)))
  6. Fr0sT.Brutal

    Modern C++ and Delphi

    Yep, Builder always was a poor child compared to Delphi.
  7. Fr0sT.Brutal

    FireBird, TFDConnection and concurrency

    Btw, you're in DLL so - Don't forget to set IsMultiThread to True manually - Don't do anything serious in DLLMain (and inside DLL project's begin-end block). DLL loading stage is pretty special, not much things are allowed here
  8. Fr0sT.Brutal

    Modern C++ and Delphi

    C has inline var declaration which is much better/safer than "with"
  9. Fr0sT.Brutal

    SFTP client

    It doesn't but it shows that implementing your own IOHandler is not a rocket science...
  10. Fr0sT.Brutal

    SFTP client

    Found SChannel IOHandler here
  11. You can have TList<PT> and dynamically alloc/dispose records
  12. Fr0sT.Brutal

    Is Embarcadero a jigsaw puzzle game?

    What's the problem in downloading a few gigs more?
  13. Fr0sT.Brutal

    How best to update from 10.3.1 to 10.3.2?

    The problem of automating is not to do programmatically some actions a user does manually but to deal with 10000000 possible issues that could happen during the process. Otherwise we could get a black box, something like Windows Update: "Cannot update - error happened!" and let the shaman dances begin
  14. Well, while this feature isn't supported by compiler, you could resolve it by auto-generating. Create a file with error definitions and descriptions and a script that would generate pascal source out of it.
  15. Fr0sT.Brutal

    FastMM4 and False Positives

    Ah yes you're right. Does stack trace in full debug mode show something useful?
  16. Yes, you should always check result of PostMessage especially if you post some allocated memory, otherwise you'll get mem leak. Btw, in my app I randomly face an issue with message threads - I have 3 of them and when one is delayed, in some cases PostThreadMessage starts returning NOT_ENOUGH_QUOTA though I limit queue size by 3000 messages for each thread. Seems to me the 10k limit is not per-thread as MSDN says but per-process or some undocumented per-process limit exists too.
  17. Fr0sT.Brutal

    SFTP client

    I know little about that as well so it's better to ask Remy
  18. @Clément you forgot to wait for message queue to init - there's a time lag after PeekMessage is called until the thread is really ready to handle messages so if you post a message right after a thread is created, it will fail I use the following code procedure TMsgLoopThread.Execute; ... PeekMessage(MsgRec, 0, WM_USER, WM_USER, PM_NOREMOVE); SetEvent(FEvMsgQueueReady); ... function TMsgLoopThread.WaitStart(WaitInterval: DWORD): DWORD; begin Result := WaitForSingleObject(FEvMsgQueueReady, WaitInterval); end; and call WaitStart after I create the thread
  19. Fr0sT.Brutal

    SFTP client

    For Indy it should be relatively easy to write a IOHandler using SSH
  20. Fr0sT.Brutal

    TIdFtp - Disconnect by server

    Server could close inactive connection, like So you can: 1) Send keep-alives (just senseless commands like NOOP, PWD, TYPE I etc. But this will burden the server with permanent connection. 2) Connect to server when it is needed and keep the connection for some reasonable time after; then disconnect
  21. Fr0sT.Brutal

    FastMM4 and False Positives

    https://github.com/pleriche/FastMM4 Meanwhile to circumvent the report look at "expected leaks" feature. I've never used it myself but it sounds like something that shall help in your situation
  22. Fr0sT.Brutal

    Left Click Does not Focus Control

    I'd say it's easier to add necessary form functions to frame (adding header and close button shouldn't be too complex)
  23. HTTP Tunnel and Socks server addresses can not have literal address (including 'localhost') because IPv6 check in `procedure TCustom*WSocket.Connect` throws 'Unsupported address format'. I suppose this check should only test for unavailable IPv6 case (i.e. address is IPv6 but OS doesn't support it).
  24. Ehm, it is intended to achieve the fix of bug that is described above. Bug is that HTTP proxy could not have non-IP address. As an alternative, only else raise ESocketException.Create('Unsupported http proxy address format'); lines could be removed. The case of v6 IP when v6 is unavailable on the system will then fall to WSocket_Synchronized_ResolveHost(FHttpTunnelServer) and fail with 'Winsock Resolve Host: Cannot convert host address' exception. Not too informative as for me but this would be minimal change.
  25. Source/OverbyteIcsWSocket.pas | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Source/OverbyteIcsWSocket.pas b/Source/OverbyteIcsWSocket.pas index dce509a0..8dd824a4 100644 --- a/Source/OverbyteIcsWSocket.pas +++ b/Source/OverbyteIcsWSocket.pas @@ -22299,13 +22299,10 @@ begin else begin { V8.56 IPv6 support from Max Terentiev } if WSocketIsIP(String(FHttpTunnelServer), LSocketFamily) then begin - if (LSocketFamily = sfIPv4) or (IsIPv6APIAvailable) then - FSocketFamily := LSocketFamily - else - FSocketFamily := DefaultSocketFamily; - end - else - raise ESocketException.Create('Unsupported http proxy address format'); + if (LSocketFamily = sfIPv6) and not IsIPv6APIAvailable then + raise ESocketException.Create('IPv6 is not available'); + FSocketFamily := LSocketFamily; + end; if WSocketIsIP(FAddrStr, LSocketFamily) then begin if LSocketFamily=sfIPv6 then FAddrStr:='['+FAddrStr+']'; // IPv6 must be in [ ] Fixed subj
×