indy

Errors with Indy in threaded application !

Hi, I've got some memories leak related to TidHTTP when it's waiting for the response of a server after a GET and that the thread is being terminated. Example : aThread = class(TThread) private FidHTTP :TidHTTP; FCommand :String; public procedure Execute(); override; constructor Create(aCommand :String); override;...

Indy, Send Thread and Destroyed Contexts

I use Indy's TIdTCPServer (D2009, Indy 10) to communicate with client applications. In the OnExecute method I create a task and queue it. A worker thread executes the task and puts it in the send queue. The send queue then sends the response to the client. In the send thread I loop through the server's context list and look for the cont...

UDP Connection through proxy in Delphi

Hello, I have an application that connects to a udp server, and I can't seem to get it going when I am behind a proxy. Here is the code I have, which is working fine when Not behind a proxy. function TfrmMain.SendCommand(ServerName, IP: String; Port: Integer; Command: String): String; var Udp : TIdUDPClient; Count : Integer; Res...

How to send e-mail using gmail's smtp and Indy 10?

I'm using Delphi 2009 and the lastest Indy 10 from svn to send e-mails using SMTP, but it doesn't work with gmail (Google Apps hosted domain). When I try to send an e-mail I get "Must issue a STARTTLS command first". I tried googling about it but I found several forums and several solutions, but they all just bashed some code or just sa...

Does Indy support raw TCP sockets on Windows?

I'm a C++ programmer, but my question is about the Delphi network socket library Indy. Essentially as Microsoft crippled raw sockets with WinXP SP2 so that TCP data cannot be sent over them, does this then also apply to Indy? One of my friends recommended it to me rather then using the WinSock API. If not, then is the only way to use r...

TIdHTTP in Indy 10

I used to use Indy back in the Delphi 6 days, and I am playing with Indy 10 now. What I want to do is incredibly simple, but I don't see a simple way of doing it, so I must be missing something. What I want to do is something like this: Here is the actual code I am using: procedure TForm1.btnGetURLClick(Sender: TObject); begin moHe...

Use SSL with Delphi yet still having a single exe

Hi, 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? ...

Server AContexts List with Indy10

Hi, I'm using Indy10 under Delphi2009. I have a server/client application, with TidTCPServer and TidTCPClient. I found a problem in my "logical" code. This is : When the server disconnect, and after a time, reconnect, the sent-clients requests are not intercepted by the server, and the server cannot contact client (because-I think- the...

How to send email via SSL and Indy in Delphi 7

I want to send email to Yahoo mail using Indy. But Yahoo uses 465 port with SSL connection. I don't know how to implement that in my program. I have read about TIdSSLIOHandlerSocketOpenSSL component on internet, but couldn't find such component in Delphi 7. Can anyone help? ...

INDY 10.1.5 - Which SSL dlls work?

I'm trying to connect to google documents (following Marco Cantu's excellent REST example) but I am getting the following SSL errors: 1) If I use the SSL dlls from openssl-0.9.8i-i386-win32.zip I get the error: "Could not load SSL library" 2) If I use the SSL dlls from indy_OpenSSL096m.zip I get the error: "Error connecting with SSL"...

Install the latest build of Indy 10 on Lazarus

Is there a step-by-step guide for install the Indy 10 components in Lazarus? I have checked out the last snv snapshot at https://svn.atozed.com:444/svn/Indy10 Username: Indy-Public-RO (No password) Thanks you ...

Simple wrapper function for WinInet post (in Delphi)

Here is a way to do an HTTP post using Indy, in one line, more or less: Response := FIdHttp.Post(URL, StringStream); Is there a function out there (function, not library) that allows the equivalent to be done using WinInet? Preferably, a function that resembles this: function PostUsingWinInet(const URL, Data :string; SSL :boolean) :...

How to enable cookies for a pseudo-browser in Delphi?

I was testing an app from Marco Cantu's Delphi 2009 Handbook. This app, called AnonAjax (page 200), has some interesting features to recognize certain elements from a Web page and list them. This app uses anonymous methods with an internal Indy HTTP client component used to access to a given URL. As part of this app's functionality, it l...

How do I send a TMemoryStream using Indy's IdTrivialFTP?

I am using Delphi 2010 and Indy 10 that ships with it. The MemStream is a TMemoryStream and it contains a file downloaded from a website. IdTrivialFTP1 := TIdTrivialFTP.Create(nil); try IdTrivialFtp1.Name := 'IdTrivialFTP1'; IdTrivialFTP1.Host := 'my-tftp-server-name.contoso.com'; IdTrivialFTP1.Port := 69; IdTrivialFTP1.ReceiveT...

Upgrade Indy9 to Indy10

I want to upgrade my application from Indy 9 to 10 with Delphi 2007. There is a lot of issues in this, I have read the indy doc about changes but I still need advise. This won't compile as ReadString is not found. vCmdHead := FTCPClient.ReadString(16); where FTCPClient is of type TIdTCPClient. vCmdHead is a structure that contains a ...

DecodeToStream in Indy10

I want to upgrade my application from Indy 9 to 10 with Delphi 2007. Now this don't compile anymore as DecodeToStream is not found. The code use Bold framwork as there is reference to BoldElement. Any alternative methods to call ? UPDATE (I think I simplify previous example too much) Original code: BlobStreamStr : String; M...

Does anyone know of a Cache component for TIdHTTP?

I'm looking for a cache implementation for the Indy IdHTTP component that would be used for checking of a specific resource is already cached before doing the actual GET and returning the cached resource instead (if appropriate)? If the component would be a derived class from TIdHTTP and handle the cache-features automatically it would ...

Upgrade Indy9 to Indy10

I want to upgrade my application from Indy 9 to 10 with Delphi 2007. In this thread there is a call to Indy9 TIdUDPBase.SendBuffer but this won't compile in Indy10 as the method parameter don't exists. The third parameter aBuffer is a var parameter and I didn't find any such method signature in Indy10. Any alternative method to call ? ...

Should TIdCmdTCPServer and TIdCmdTCPClient be used together?

Hi, I am trying to write a server and a set of clients that talk to the server. The server will maintain the status of different clients and allow them to alert the central server when there is a status change. A specialist client will allow the control of the other connected clients. I have the server as a TIdCmdTCPServer and the clien...

Refuse SMTP messages over a certain size with IdSMTPServer on Delphi 2006

I'm using Delphi 2006 and the TIdSMTPServer component (Version 10.1.5) to set up a SMTP server. This works fine, but I don't want to accept messages that are above a certain size. Is there a way to interogate the size of the incoming message before the server receives it and refuse it? ...