-
Content Count
66 -
Joined
-
Last visited
-
Days Won
2
Posts posted by chmichael
-
-
Why you don't use TMonitor ?
-
1
-
-
-
Hello,
Wouldn't be nice to enable Discussions on github for indy ?
Thank you
-
Why i missed that ?
Thank you
-
Hello,
Is there any function to get the TDateTime from the header which is "last-modified: Sun, 29 Dec 2024 23:06:49 GMT"
Thank you
-
It's fixed with ICS V9.4 - Part 6
-> Fixed bug introduced in V9.3 which corrupted the Content-Transfer-Encoding header line if not 7bit.
-
On 9/24/2024 at 6:49 PM, Angus Robertson said:I've just tested the OverbyteIcsSslMailSnd sample in V9,3 and it's sending content and attached files as expected with the correct encoding headings.
But it is not attempting to send HTML emails.
BTW, the component expects String content and will convert to whatever encoding is specified, no idea what will happen if you encode UTF8 and it then encodes it again.
Angus
Angus
I'll take a deeply look when i find some time
-
I think the error is header for whatever reason it's not the correct eg:
v9.1: Content-Transfer-Encoding: quoted-printable
v9.3: Content-Transfer-Encoding: q
Seems 9.3 doesn't apply the correct header values
Also Return-Path: <> is empty (in both v9.1 and v9.3)
-
Hello,
Here's the function which i send the e-mails
function SendEMail(const AArgs: TArray<String>): String; var FSMTP: TSSLSmtpCli; begin FSMTP := TSSLSmtpCli.Create(nil); FSMTP.SslContext := TSslContext.Create(nil); FSMTP.SslContext.SslMinVersion := sslVerTLS1_2; with FSMTP do begin Host := 'my.emailserver.com'; Port := '587'; Username := 'myuser@emailserver.com'; Password := 'mypassword'; AuthType := smtpAuthAutoSelect; ContentType := smtpHtml; // Important !!! Set it First //Allow8bitChars := False; //ConvertToCharset := True; CharSet := 'UTF-8'; HdrFrom := 'myuser@emailserver.com'; HdrTo := 'myuser@emailserver.com'; RcptName.Text := HdrTo; HdrSubject := UTF8Encode(VarToStr(AArgs[0])); if Length(AArgs) > 1 then MailMessage.Text := UTF8Encode(VarToStr(AArgs[2])); OpenSync; MailSync; Result := ErrorMessage; FreeAndNil(FSMTP.SslContext); FreeAndNil(FSMTP); end; end;
Using the v9.3 SVN version the e-mail which it sends adds an extra attachment which v9.1 didn't: (either plaintext either html)
-
Hello,
I get a "attachment.asm" or (.htm if it's html) in the e-mail ICS 9.3 SVN sends.
Any ideas ?
Thank you
-
Experimenting with message protocols and DNS
-
8 hours ago, Angus Robertson said:I looked at MSQuic when it came out with a view to supporting it for ICS. For Linux, MSQuic uses a forked OpenSSL version, but SChannel for Windows. So MSQuic requires the latest Windows OS.
This isn't a problem in a year from now most will use Windows 11.
8 hours ago, Angus Robertson said:To my knowledge, there are no functional benefits to HTTP/2 except performance with complex web applications with hundreds of elements on a page, and Delphi is not usually used for complex pages.
Messaging protocols and middleware benefit also.
8 hours ago, Angus Robertson said:I'd like to write a Delphi HTTP/2 implementation for ICS, but it really needs to be sponsored. I can not justify the time myself, rather work on more useful projects.
Yes i know it's time consuming task but you can make sell it.
atm only esegece has native delphi http/2 support as far i know.
It would be nice to have a benchmark between esegece HTTP/2 vs ICS HTTP 1.1.
-
Hello,
Anyone translated MSQuic headers for Delphi use ?
Seems to be the best implementation atm.
Thank you
-
Got it! Thanks!
-
2 hours ago, Angus Robertson said:Most ICS functions are async, not blocking, you missed IpLogClient.onLogProgEvent := onCliLogProgEvent; from snippets, and in the event you check IpLogClient.States[0] for logstateOK or something else if failed.
As is often discussed here, it is rarely necessary or useful to use ICS components in a thread, but if so you can not use application.processmessages since that is the main thread, you have to create the component within the thread Execute method, set the MultiThreaded property to true, and call the component ProcessMessages method instead.
Angus
Ok, i fixed the routine to work both on main and on a thread. It works correctly locally but remotely it always connect OK even if the "server/port" is closed. Any ideas ?
btw, doSocketRemoteClick has the same behavior.
function IsInternetPortOpenICS(const AIPAddress: AnsiString = ''; const APort: Word = 0; const ATimeOut: NativeUInt = INFINITE): Boolean; var IpLogClient: TIcsIpStrmLog; FThreadID, FTimeout: NativeUInt; begin Result := False; try FThreadID := GetCurrentThreadId; IpLogClient := TIcsIpStrmLog.Create(nil); IpLogClient.LogProtocol := logprotTcpClient; IpLogClient.RemoteHost := AIPAddress; IpLogClient.RemoteIpPort := APort.ToString; //IpLogClient.onLogProgEvent := Form9.onCliLogProgEvent; //IpLogClient.CheckPing := True; //IpLogClient.PingWaitSecs := 1; if FThreadID <> MainThreadID then IpLogClient.MultiThreaded := True; IpLogClient.StartLogging; FTimeout := 0; while FTimeout < ATimeout do begin if FThreadID = MainThreadID then Application.ProcessMessages else IpLogClient.ProcessMessages; Result := IpLogClient.States[0] = logstateOK; if Application.Terminated or Result then Break; Inc(FTimeout, 10); Sleep(10); end; IpLogClient.StopLogging; finally if Assigned(IpLogClient) and IpLogClient.AnyStateOK then IpLogClient.StopLogging; FreeAndNil(IpLogClient); end; end;
-
5 hours ago, Angus Robertson said:The simplest way is with the TIcsIpStrmLog component, look at the doSocketRemoteClick procedure in the OverbyteIcsSnippets sample, although you can ignore SSL.
Failing to open a normal TCP connection will timeout after about 30 to 40 seconds, you can not easily make this any shorter, and you can not re-use the socket until the connection attempt fails, even if you abort it earlier. If you need to check a lot of ports, either use multiple components running in parallel (no threads needed for hundreds) or use the ping feature of TIcsIpStrmLog to see if at least the IP address exists before checking the port.
Angus
Hello Angus,
How can i get the result ? (Is open or not) Do i have to use application.processmessages ? I'm going to use this routine in a thread.
Thank youfunction IsInternetPortOpenICS(const AIPAddress: AnsiString = ''; const APort: Word = 0; const ATimeOut: NativeUInt = INFINITE): Boolean; var IpLogClient: TIcsIpStrmLog; begin try IpLogClient := TIcsIpStrmLog.Create(nil); IpLogClient.MaxSockets := 1; IpLogClient.LogProtocol := logprotTcpClient ; IpLogClient.RemoteHost := AIPAddress; IpLogClient.RemoteIpPort := APort.ToString; IpLogClient.CheckPing := False; IpLogClient.StartLogging; Result := // Check if connected ??? IpLogClient.StopLogging; finally if Assigned(IpLogClient) and IpLogClient.AnyStateOK then IpLogClient.StopLogging; FreeAndNil(IpLogClient); end; end;
-
16 hours ago, Remy Lebeau said:A connect() timeout can be implemented by just using a non-blocking socket and close() the socket after the timeout elapses. If it uses a thread internally, that is just an implementation detail of the OS, but that shouldn't block the app from being able to move on.
Well I'm using the following code to do what you're saying but for some reason it doesn't always work! Eg. even if the server port is closed it will return "True".
-
Hello,
How can i check if a TCP port is open over Internet with timeout using ICS ?
Thank you -
19 hours ago, Rollo62 said:I have checked that but it doesn't check the RowPitch.
-
Hello,
Anyone knows how to copy the Bits from a ID3D11Texture2D which it has different RowPitch than Bitmap.Width * 4 ?
if FTexture.RowPitch = FBitmap.Width * 4 then
for I := 0 to FBitmap.Height - 1 do
Move(FTexture.pData[4 * FBitmap.Width * I], FBitmap.Scanline^, 4 * FBitmap.Width);
else
?????Thank you
-
8 hours ago, Renate Schaaf said:It won't work, unless the images are all of the same size. Changing the size would cause at least a partial re-initialization.
For streaming it's always the same
-
1 hour ago, Renate Schaaf said:Of course, no other app would be able to use this format.
Well if you use it for internal use or streaming purposes you don't care.
-
bme.AddFrame(bm, false); It took 53 milliseconds to encode a 8k image faster than turbo-jpeg and with lower size as you say.
Imagine using a TMemoryStream you can do whatever you want with the frames and i'll don't care about the expensive initialization.
I don't understand why it creates a 10s video instead of 1s ...
-
4 hours ago, Renate Schaaf said:This is why that makes no sense (quoted from https://cloudinary.com/guides/video-formats/h-264-video-encoding-how-it-works-benefits-and-9-best-practices)
"H.264 uses inter-frame compression, which compares information between multiple frames to find similarities, reducing the amount of data needed to be stored or transmitted. Predictive coding uses information from previous frames to predict the content of future frames, further reducing the amount of data required. These and other advanced techniques enable H.264 to deliver high-quality video at low bit rates. "
That goes to my first request " 1) Encode to Stream".
As far the compression HEIF actually uses H.265 compression but there is not any hardware acceleration in Delphi or at least haven't found any!
https://en.wikipedia.org/wiki/High_Efficiency_Image_File_FormatHEIF files containing HEVC-encoded images are also known as HEIC files. Such files require less storage space than the equivalent quality JPEG.[2][3]
Thank you
What new features would you like to see in Delphi 13?
in Delphi IDE and APIs
Posted · Edited by chmichael
CrossVCL should be awesome and Open Source RTL as C# has