-
Content Count
2268 -
Joined
-
Last visited
-
Days Won
46
Everything posted by Fr0sT.Brutal
-
Am I the one who doesn't see download link on that page?
-
SChannel TLS - perform TLS communication with WinAPI
Fr0sT.Brutal replied to Fr0sT.Brutal's topic in I made this
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. -
Exception is swallowed in TCustomWSocket.ASyncReceive
Fr0sT.Brutal posted a topic in ICS - Internet Component Suite
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 -
Exception is swallowed in TCustomWSocket.ASyncReceive
Fr0sT.Brutal replied to Fr0sT.Brutal's topic in ICS - Internet Component Suite
Well, it's always better if no exceptions happen at all but the world isn't perfect ))) -
Exception is swallowed in TCustomWSocket.ASyncReceive
Fr0sT.Brutal replied to Fr0sT.Brutal's topic in ICS - Internet Component Suite
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 :))) -
Yep, Builder always was a poor child compared to Delphi.
-
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
-
C has inline var declaration which is much better/safer than "with"
-
It doesn't but it shows that implementing your own IOHandler is not a rocket science...
-
Found SChannel IOHandler here
-
TArray vs TList with VirtualStringTree
Fr0sT.Brutal replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
You can have TList<PT> and dynamically alloc/dispose records -
What's the problem in downloading a few gigs more?
-
How best to update from 10.3.1 to 10.3.2?
Fr0sT.Brutal replied to Incus J's topic in Delphi IDE and APIs
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 -
I wish I had RTTI for constants and/or a compiler magic NameOf()
Fr0sT.Brutal replied to Lars Fosdal's topic in RTL and Delphi Object Pascal
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. -
Ah yes you're right. Does stack trace in full debug mode show something useful?
-
Windows messages are lost when using SetTimer
Fr0sT.Brutal replied to Clément's topic in Algorithms, Data Structures and Class Design
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. -
I know little about that as well so it's better to ask Remy
-
Windows messages are lost when using SetTimer
Fr0sT.Brutal replied to Clément's topic in Algorithms, Data Structures and Class Design
@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 -
For Indy it should be relatively easy to write a IOHandler using SSH
-
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
-
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
-
I'd say it's easier to add necessary form functions to frame (adding header and close button shouldn't be too complex)
-
Bug: HTTPTunnel and Socks servers can't have non-IP address
Fr0sT.Brutal posted a topic in ICS - Internet Component Suite
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). -
Bug: HTTPTunnel and Socks servers can't have non-IP address
Fr0sT.Brutal replied to Fr0sT.Brutal's topic in ICS - Internet Component Suite
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. -
Bug: HTTPTunnel and Socks servers can't have non-IP address
Fr0sT.Brutal replied to Fr0sT.Brutal's topic in ICS - Internet Component Suite
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