indy

send and recive TStringStream with indyTcp server and client

浪子不回头ぞ 提交于 2019-12-25 18:27:08
问题 I am trying to send a TStringStream from client to server, then send it back from server to client, using Indy TCP components. Here is my client code: var Jpg: TJPEGImage; StringStream: TStringStream; strcams, StringImageData: String; byt, i: integer; procedure SendCommandWithParams(Command, Params: String); begin Lock; try if not FTCP.Connected then begin exit; end; FTCP.Socket.WriteLn('1' + Command, IndyTextEncoding_UTF8); FTCP.Socket.WriteLn(Params, IndyTextEncoding_UTF8); finally Unlock;

Delphi 6. How to set idTelnet.Connect timeout for early return on no connection

喜你入骨 提交于 2019-12-25 16:50:28
问题 Calling idTelnet.Connect normally connects to the remote device instantaneously. But, if the remote device does not respond, then the call to idTelnet.Connect does not return. It waits for a response from the remote device. This hangs the entire application. How can I set a timeout so that idTelnet.Connect returns within nn ms regardless of whether a connection has been established or not? 回答1: if the remote device does not respond, then the call to idTelnet.Connect does not return. Yes, it

Delphi IdIcmpclient ping error 10040 xe5

主宰稳场 提交于 2019-12-25 12:43:10
问题 These two days I start to write some codes for ping some other devices using Delphi XE5. To my pleasure, I find there's a component named IcmpClient can be used for ping. Here's the code, mostly from some web resource. unit main; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.Samples.Spin, Vcl.ExtCtrls, IdBaseComponent, IdComponent, IdRawBase, IdRawClient, IdIcmpClient;

idHttp : error 500 internal server when site is https

喜你入骨 提交于 2019-12-25 09:36:35
问题 I am working on a project involving login and download, for more than 20 site, in some cases, the sites are very alike, even their structure is the same i have encountered a problem recently, some of the same structured sites are http and some are Https , the Http ones are ok and work fine but the Https ones at the very first post return an error 500 internal server when i try to login, the response code shows for security reasons you can not access ... do i need to change my approach with

CodeIgniter “sess_time_to_update” and Indy Cookies

╄→尐↘猪︶ㄣ 提交于 2019-12-25 08:57:09
问题 I have this horribly stripped delphi code that basically login to server, save cookie in a global cookie manager, then upload files in threads (using Delphi 2010 + Indy 10.4736) Each thread reads the global cookie manager and upload the file. Server side, I'm using PHP with CodeIgniter . Everything works just fine, except that CodeIgniter has this sess_time_to_update setting in config. This *sess_time_to_update* defaults to 300 seconds after which CodeIgniter completely regenerate the session

Delphi iOS IPv6 trouble. Please ensure that your app is compatible with IPv6 networks

£可爱£侵袭症+ 提交于 2019-12-25 06:56:12
问题 I can't to publish my iOS app to AppStore. Delphi 10.1.2 Berlin, iOS64, Win 8.1. I received the next info from apple: Thank you for your response. Please ensure that your app is compatible with IPv6 networks. The easiest way to test your app for IPv6 compatibility is to set up a local IPv6 network on your Mac. You can then connect to the network from your iOS devices to test IPv6 compatibility. Please follow the step-by-step instructions provided in Supporting IPv6 DNS64/NAT64 Networks. For

Why won't TIdIRC connect to channel? Is there a better component?

 ̄綄美尐妖づ 提交于 2019-12-25 05:14:40
问题 I've been struggling with the crap documentation of Google and can't get the program to join the channel even though it connects to the server fine. (It says Connected to server) //On Form Make procedure TForm2.FormCreate(Sender: TObject); begin IdIRC1.Connect(); end; //on connected procedure TForm2.IdIRC1Connected(Sender: TObject); begin ShowMessage('Connected to server'); IdIRC1.Join('#TheChannel', 'password'); end; Once i close the form an error comes up saying: Project raised exception

Delphi Indy TCP Client/Server communication best approach

早过忘川 提交于 2019-12-24 20:49:41
问题 I have a client and a server application that is communicating just fine, there is a TIdCmdTCPServer in the server and a TIdTCPClient in the client. The client has to authenticate in the server, the client asks the server for the newest version information and downloads any updates, and other communications. All this communication with TIdTCPClient.SendCmd() and TIdTCPClient.LastCmdResult.Text.Text. The way it is, the server receives commands and replies, the clients only receives replies,

delphi Form with multi instance use

孤街浪徒 提交于 2019-12-24 12:37:26
问题 i've an FTP uploader project that uses a form created on run time to start uploading to multiple FTP Servers ( using Indy ) , my issue is as follows ( and i really need your help ) . On a Form i put an IdFTP Component + an Upload button + public properties named FTPSrvAdrs and SrcFile + TrgFolder like this way : type TFtpUploader = class(TForm) IdFTP: TIdFTP; StartUpload:TButton; UploadProgress:TProgressBar; procedure StartUploadClick(Sender: TObject); procedure FormClose(Sender: TObject; var

Changing charset when retrieving messages from mail server!

时间秒杀一切 提交于 2019-12-24 11:36:04
问题 i'm currently creating a little mail client and facing a problem with charset. I use indy's TIdIMAP4 component to retrieve data from mail-server. When i try to retrieve mail bodies then accent letters like ä, ü etc are converted to =E4, =FC respectively as it is using charset ISO-8859-1. Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable How can i make server to send me data in another charset, like utf-8? What would be the best solution for that