indy

Is it good to use the latest version of OpenSSL with Indy or not?

I just upgraded Indy to th latest version (10.5.7), I was using the OpenSSL dlls in version 0.9.8.13. Is it good to use the latest version (1.0.0a) or since the version I have (0.9.8.13) works fine it is a risk to upgrade since there can be bugs in it? ...

Suggestions for deploying openSSL dlls

I made a simple application that uses Indy and requires OpenSSL dlls. I am not going to write an installer for it, so I have 2 options: 1) deploy it by copying the application exe + libeay32.dll + ssleay32.dll in the same folder 2) put libeay32.dll and ssleay32.dll in the exe resources and extract them to the applicationpath on progra...

Sending special strings with "WriteLn" in "Indy" (Delphi)

Hi, In Indy when we are sending some strings to the server , they change and will be shown in new format . for example i tried to send a binary file(File.exe) with "WriteLn" command in indy : Ms.LoadFromFile(FileAddress); Ms.Read(B, Chunk); for j := low(B) to high(B) do begin Part := Part + chr(B[j]); end; ...

Send an e-mail with rtf text in delphi

I would like to perform the following task: converting a TRichEdit content (an rtf text) into a not-plain-text e-mail message body. MAPI doesn't support rtf, but is there a way to do it maybe with Indy? The problem is that rtf is rtf and emails are plain text or HTML. Can someone suggest a trick? Is it possible to convert rtf to text ...

Is there a way to set response timeout for Indy Tidhttp gets?

I have built a simple website monitoring application using Indy TIdhttp component. I want to detect when a designated page is not returned within a specified time frame (I am using 5000 milliseconds). As a test I created a page on a web site which intentionally takes 15 seconds to respond. But I can't get my procedure to "give up" aft...

Why does IOHandler.ReadStream blocks thread when client connects to server in Indy?

Hi, Today I faced a weird behavior using Indy 10 (shipped with Delphi 2010). Here is the problem: Suppose we have a IdTcpClient in our client, and a IdTcpServer in our server app, and this code in OnExecute event-handler for our IdTcpServer: procedure TForm1.IdTCPServer1Execute(AContext: TIdContext); var AStream: TStringStream; S:...

How to check if a socket client-server is on same network ?

I'm working with socket and to this I'm using TIdTCPClient and TIdTCPServer. I need to check if the TIdTCPServer that the TIdTCPClient connected is on the same network. How can I do this ? at. ...

Check if connection is Closed !

Hello, I've written a Delphi (2009) app with Indy (TCPServer/Client). And I have a problem at the level of TCPServer : it detects the deconnection(after a reboot of the PC) of the Client only when the client tries one more time to reconnect to the server. I've executed my app step by step, and when the client tries top reconnect (after t...

how to communicate with tor network

hi all how can i commpunicate with tor network in delphi i want to use tor network for my IDHTTP1 operations is it possible ? if yes can any one help me regards :) ...

Progress feedback in stateless HTTP session

I need to program a stateless server to execute remote methods. The client uses REST with a JSON parameter to pass the method name and its parameters. After servicing the result the session is closed. I have to use Indy10, TCP/IP as protocol, and therefore look at using IdHTTPServer. Large result sets are chunked by Indy10 and sent to t...

Send and Receive a simple string value with Indy (Delphi)

Hi, is there any way to send a simple text(string value) without using WriteLN and ReadLN? The ReadLn function needs LF char and when I'm sending a text message via winsock to Indy, ReadLn cannot get the message correctly and some exceptions will be happen continuously. ...

Deadlock on tidtcpserver.active = false (Delphi2007/indy10)

I am having a problem with some code that was written by a developer that has now left our company, the code implements a tcpserver that responds to an XML based protocol. This appears to be working absolutely fine in our test environment but one or two customers are having problems with application shutdown. I have traced this to what...

how to block unknown clients in indy (Delphi)

Hi , I have a public server(configured with indy 10) . some unknown clients are sending thousands of no content messages that it change the server's cpu usage to 50% . i have no firewall on my server , so i tried to block the unknown clients with this codes : This is a function that works with a Timer : var i, j: integer; begin IX...

tIdHttpServer - EidConnClosed before sending a reply to POST

I am having trouble implementing a HTTP server with indy 10 in delphi 2007. I have set up a simple event handler for the CommandGet event. When replying to data sent using the GET method I can parse the params and send XML data back with no problems. (see code below) Download := ARequestInfo.Params.Values['dld']; Config := ARe...

Can i use IdHTTP in the OnExecute Event (Indy) ?

Hi , Can i use IdHTTP in the OnExecute Event (Indy) ? like this : procedure TForm1.IdTCPServer1Execute(AContext: TIdContext); var H: TIdHTTP; Data, Res: string; begin Data := AContext.Connection.IOHandler.ReadLn(); H := TIdHTTP.Create(nil); try Res := H.Get(Data); finally H.Free; end; AContext.Connection.IOHandle...

Working with database in the OnExecute event (Indy)

Hi , i have a server with these codes : procedure TFrmMain.TCPServerExecute(AContext: TIdContext); begin Res := DoRegister(Name,Family,Username,Password); end; function TFrmMain.DoRegister(Name,Family,Username,Password:string): bool; var Qry: TSQLQuery; begin Qry := TSQLQuery.Create(nil); try Qry.SQLConnection := FrmCon...

How to disconnect the TCPClient Totally ? (Indy)

Hi , When my Tcpclient is working , with this code : TCPClient.Disconnect; TCPClient.Connect; I get "raised exception class EIdAlreadyConnected with message 'Already connected.'." error still (whereas , it has been disconnected before) . So , how can i disconnect it totally ? Thank you ...

Better Indy for Dephi 2007

Hi all, Which better is using default indy10 that's comes with Delphi 2007 or upgrade it to latest snapshot version and why ? Thank you ...

Indy HTTP Client: sessions like in web browser

I'm making a program for registration on a website. For this, I use C++Builder and Indy (TIdHTTP). How it works: Program receives registration page via GET and extracts CAPTCHA picture address from it; downloads the CAPTCHA (GET) and serves it to user; sends the data provided by user to the website in POST request. Problem: The CAPT...

Help needed coding an IRC client in Delphi 2010 using Indy Components

Im trying to code a basic irc client in Delphi 2010 using Indy components. Im able to connect to my irc server (unrealircd) using sample A below. After connecting I have many procedures that should perform actions when it receives a private message, ping, ctcp, channel modes etc. but they never react to any of these incoming events. Sa...