indy

How to download a file with progress with IdHTTP via https

*爱你&永不变心* 提交于 2019-12-03 08:53:23
I'm trying to download a file using indy10 http components TIdHttp while getting the progress , I have just setted the libraries in the application folder while using the code for http URL it works and progress but with https it simply does nothing and it doesn't raises any exception :/ with TIdHTTP.Create(nil) do begin IOHndl:=TIdSSLIOHandlerSocketOpenSSL.Create(nil); Request.BasicAuthentication:=True; HandleRedirects:=True; IOHandler:=IOHndl; OnWork:=FOnWork; OnWorkBegin:=FOnWorkBegin; OnWorkEnd:=FOnWorkEnd; Get(FUrl,FStream); end; Best Regards First you have to create a small class to wrap

How can I update HTML pages dynamically with Indy HTTP server using jQuery and “Long Polling”?

核能气质少年 提交于 2019-12-03 08:14:45
I have read the article Simple Long Polling Example with JavaScript and jQuery . The paragraph "Long Polling - An Efficient Server-Push Technique" explains that the Long Polling technique combines the best-case traditional polling with persistent remote server connections. The term Long Polling itself is short for long-held HTTP request. How can I implement a Indy based HTTP server which uses Long Polling? Here is a self-contained example project, tested with Indy version 10.5.9 and Delphi 2009. When the application runs, navigate to http://127.0.0.1:8080/ . The server will then serve a HTML

Is TIdHTTPServer Compatible with Microsoft BITS

蹲街弑〆低调 提交于 2019-12-03 07:08:33
We are trying to write an update server for our software using the TIdHTTPServer component. Currently we are serving an XML file that lists the available updates and their file versions etc.., when the client program finds a updated version it should start to download it using BITS. Now this is where we have a problem, our programs are requesting the XML file and seeing there is an update available. It then creates a BITS job to download it, however BITS keeps reporting that the download failed. We can download the file using the same URL and IE/Firefox/Chrome. so my question: Is TIdHTTPServer

What do the SMTP Indy component security and authentication properties do?

跟風遠走 提交于 2019-12-03 06:25:16
问题 I am using the indy components to implement emails in a delphi application. I am specifically using the TidSMTP component. I need to effectively support all major email servers. I use Mozilla Thunderbird as my email client and am comparing the smtp properties with those in the TidSMTP component. I have attempted to find documentation that describes the relationship between the TidSMTP properties, but have not been able to figure it out. Can someone explain how these compare and what they do:

How to handle received data in the TCPClient ? (Delphi - Indy)

对着背影说爱祢 提交于 2019-12-03 05:59:00
问题 When i send a message from TCPClient to a TCPServer it will be handled using OnExecute event in the server . Now i want to handle the received messages in the Client but TCPClient doesn't have any event for this. So i have to make a thread to handle them manually. how can i do it ? 回答1: As others said in response to your question, TCP is not a message oriented protocol, but a stream one. I'll show you how to write and read to a very simple echo server (this is a slightly modified version of a

Delphi: Indy TIdTCPClient Reading Data

↘锁芯ラ 提交于 2019-12-03 03:55:53
I am using Delphi 2007 & Indy 10; I am a bit of a Delphi noob so apologies if I have missed something obvious... Background: I have a simple server app which simply sends the word "PING" when you connect to its port. It will also respond if it receives the word "PONG". This is working fine, I have manually tested this using netcat/wireshark. I am trying to code my client to connect to the port and automatically respond to the word PING whenever it receives it. I have created a simple form with a button to manually connect. The client connects, but it does not respond to the word PING. I think

Use SSL with Delphi yet still having a single exe

倾然丶 夕夏残阳落幕 提交于 2019-12-03 03:54:36
We use Indy and we need SSL eMail support in our app., however we need to have our application in a single .Exe. We know that the default Indy handler requires to have the dlls in the path. Extracting the Dlls from one of the EXE's resources would be the last resort. Any better ideas? Try SSLBlackBox . TOndrey gave you a good answer. I use SecureBlackBox as well. You may consider some other third party components: StreamSec SecureBridge from DevArt Be aware: if you add SSL/TLS support inside your executable, it might become restricted for export . If you're in the USA, this could mean that

Download file progressively using TIdHttp

只愿长相守 提交于 2019-12-03 02:50:01
问题 I want to implement a simple http downloader using TIdHttp (Indy10). I found two kind of code examples from the internet. Unfortunately none of them satisfy me 100%. Here is the code and I want some advise. Variant 1 var Buffer: TFileStream; HttpClient: TIdHttp; begin Buffer := TFileStream.Create('somefile.exe', fmCreate or fmShareDenyWrite); try HttpClient := TIdHttp.Create(nil); try HttpClient.Get('http://somewhere.com/somefile.exe', Buffer); // wait until it is done finally HttpClient.Free

What do the SMTP Indy component security and authentication properties do?

倾然丶 夕夏残阳落幕 提交于 2019-12-02 20:58:38
I am using the indy components to implement emails in a delphi application. I am specifically using the TidSMTP component. I need to effectively support all major email servers. I use Mozilla Thunderbird as my email client and am comparing the smtp properties with those in the TidSMTP component. I have attempted to find documentation that describes the relationship between the TidSMTP properties, but have not been able to figure it out. Can someone explain how these compare and what they do: In Thunderbird:Connection Security: (None, STARTTLS, SSL/TLS). In TidSMTP.UseTLS (utNoTLSSupport,

How to handle received data in the TCPClient ? (Delphi - Indy)

大憨熊 提交于 2019-12-02 19:25:51
When i send a message from TCPClient to a TCPServer it will be handled using OnExecute event in the server . Now i want to handle the received messages in the Client but TCPClient doesn't have any event for this. So i have to make a thread to handle them manually. how can i do it ? As others said in response to your question, TCP is not a message oriented protocol, but a stream one. I'll show you how to write and read to a very simple echo server (this is a slightly modified version of a server I did this week to answer other question): The server OnExecute method looks like this: procedure