indy

Upgrading to XE5 from Delphi 5: UDPClient.SendBuffer

。_饼干妹妹 提交于 2019-12-08 09:14:17
问题 I am upgrading an older version of Delphi to XE5, The older version uses Indy Component UDPClient, XE5 says SendBuffer cannot be called with these arguments. Will someone please help me. Here is sample code snippet: var i: integer; begin i := bpt; if i <> 0 begin //send Reset byte myBuff[i] := chr(_reset); // reboot the LIA inc(i); IdUDPClient1.SendBuffer(myBuff,i); end; end; where myBuff : array[0..255] of char; Thank you in advance for your help. Mike 回答1: You need to convert your data to a

Check remote port access using Delphi - Telnet style

倾然丶 夕夏残阳落幕 提交于 2019-12-08 07:59:58
问题 I deploy my application in environments heavily stricken with firewalls. Frequently I find myself using Telnet to check if a port is open and accessible in the network. Now I would like to implement an equivalent functionality of the command, Telnet [domainname or ip] [port] , in Delphi. Is it adequate that I just attempt to open and close a TCP/IP socket without sending or receiving any data? Is there any risk that I might crash the arbitrary application/service listening on the other end?

Porting PHP code to Delphi code [closed]

瘦欲@ 提交于 2019-12-08 07:54:50
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I am working on integrating tor to my Delphi application; the whole story is explained in this link After that I searched the internet then I found a code to switch new identity in PHP function tor_new_identity($tor_ip='127.0.0.1', $control_port='9051', $auth_code=''){ $fp = fsockopen($tor_ip, $control_port,

Sending and receiving data streams in Delphi

对着背影说爱祢 提交于 2019-12-08 07:09:05
问题 I want to create a software to connect to another and send some data (text based) to another program through the internet. The software will send data every 300 milliseconds (using timer) and the receiver must receive the data on time. The connection can be like the following any data can be lost; but the rest must arrive on time with minimum delay as possible (maximum 2 seconds); the delayed data can be considers as lost, can be ignored. I think it may be similar to a video conference

Delphi 6 and Indy SSL connection not working

你。 提交于 2019-12-08 06:11:12
问题 I need to consume a Web Service via SSL. In order to accomplish that I have built a web client in Delphi 6 that uses Indy to read the client certificates and write the soap request via https. The compilated version of the code is a DLL that runs in IIS 5.0. After tested the code in my local machine it works fine (I'm behind a proxy). But after the code is deployed to prod servers (not proxy) the SSL connection fails saying "Error connecting with SSL". Here is my code: var Response:

Using TidHTTPServer to serve GET request the safe way

流过昼夜 提交于 2019-12-08 02:13:08
问题 I have a class with many services that basically call Database connections (DBISAM or via ZEOS). I am makinge this class available in a webservice like using TidHTTPServer. I am using the OnCommandGet Event from it and use the ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo to make the requests and results. I have created a TObjectList to hold an instance of each client related to this service class. The connection to the database is created and freed for every call done,

Indy FTP TransferType

…衆ロ難τιáo~ 提交于 2019-12-07 22:21:24
问题 I'm using the IdFTP (Indy 10) component to download some files (zip and txt) from a remote location. Before getting each file I set the TransferType to binary. IdFTP.TransferType := ftBinary; IdFTP.Get(ASource, ADest, AOverwrite); I expect that both text and binary files can be downloaded using the binary mode. However it looks like text files contents is messed up while zip files are downloaded correctly. If I set the TransferType to ASCII for text files it works as expected. How can I

VirtualTreeView add roots with Threads

点点圈 提交于 2019-12-07 20:33:50
问题 I would like to add roots to a VirtualTreeView http://www.delphi-gems.com/index.php/controls/virtual-treeview with a thread like this: function AddRoot ( p : TForm1 ) : Integer; stdcall; begin p.VirtualStringTree1.AddChild(NIL); end; var Dummy : DWORD; i : Integer; begin for i := 0 to 2000 do begin CloseHandle(CreateThread(NIL,0, @ADDROOT, Self,0, Dummy)); end; end; The reason for this is that I want to add all connections from my INDY Server to the TreeView. Indy's onexecute/onconnect get's

Sending message to gmail fails with “Start SSL negotiation command failed.” error

我只是一个虾纸丫 提交于 2019-12-07 18:06:34
问题 Tips i followed is found here. I do have libeay32.dll and ssleay32.dll in win32 folder. dfm file: object tidSMTP: TIdSMTP IOHandler = tidSMTP_SSL SASLMechanisms = <> UseTLS = utUseExplicitTLS end object tidSMTP_SSL: TIdSSLIOHandlerSocketOpenSSL Destination = 'smtp.gmail.com:587' Host = 'smtp.gmail.com' MaxLineAction = maException Port = 587 DefaultPort = 0 SSLOptions.Mode = sslmUnassigned SSLOptions.VerifyMode = [] SSLOptions.VerifyDepth = 0 end and Send button click event: procedure TForm1

Delphi & Indy & utf8

ε祈祈猫儿з 提交于 2019-12-07 13:59:44
问题 i have a problem to access into websites whit utf8 charset, for example when i try to accesso at this www Click for example all utf8 characters are not correctly codified. This is my access routine: var Web : TIdHTTP; Sito : String; hIOHand : TIdSSLIOHandlerSocketOpenSSL; begin Url := TIdURI.URLEncode(Url); try Web := TIdHTTP.Create(nil); hIOHand := TIdSSLIOHandlerSocketOpenSSL.Create(nil); hIOHand.DefStringEncoding := IndyTextEncoding_UTF8; hIOHand.SSLOptions.SSLVersions := [sslvTLSv1