Search Results

Search found 74 results on 3 pages for 'indy 9'.

Page 2/3 | < Previous Page | 1 2 3  | Next Page >

  • UTF-8 GET using Indy 10.5.8.0 and Delphi XE2

    - by Bogdan Botezatu
    I'm writing my first Unicode application with Delphi XE2 and I've stumbled upon an issue with GET requests to an Unicode URL. Shortly put, it's a routine in a MP3 tagging application that takes a track title and an artist and queries Last.FM for the corresponding album, track no and genre. I have the following code: function GetMP3Info(artist, track: string) : TMP3Data //<---(This is a record) var TrackTitle, ArtistTitle : WideString; webquery : WideString; [....] WebQuery := UTF8Encode('http://ws.audioscrobbler.com/2.0/?method=track.getcorrection&api_key=' + apikey + '&artist=' + artist + '&track=' + track); //[processing the result in the web query, getting the correction for the artist and title] // eg: for artist := Bucovina and track := Mestecanis, the corrected values are //ArtistTitle := Bucovina; // TrackTitle := Mestecani?; //Now here is the tricky part: webquery := UTF8Encode('http://ws.audioscrobbler.com/2.0/?method=track.getInfo&api_key=' + apikey + '&artist=' + unescape(ArtistTitle) + '&track=' + unescape(TrackTitle)); //the unescape function replaces spaces (' ') with '+' to comply with the last.fm requests [some more processing] end; The webquery looks in a TMemo just right (http://ws.audioscrobbler.com/2.0/?method=track.getInfo&api_key=e5565002840xxxxxxxxxxxxxx23b98ad&artist=Bucovina&track=Mestecani?) Yet, when I try to send a GET() to the webquery using IdHTTP (with the ContentEncoding property set to 'UTF-8'), I see in Wireshark that the component is GET-ing the data to the ANSI value '/2.0/?method=track.getInfo&api_key=e5565002840xxxxxxxxxxxxxx23b98ad&artist=Bucovina&track=Mestec?ni?' Here is the full headers for the GET requests and responses: GET /2.0/?method=track.getInfo&api_key=e5565002840xxxxxxxxxxxxxx23b98ad&artist=Bucovina&track=Mestec?ni? HTTP/1.1 Content-Encoding: UTF-8 Host: ws.audioscrobbler.com Accept: text/html, */* Accept-Encoding: identity User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.23) Gecko/20110920 Firefox/3.6.23 SearchToolbar/1.22011-10-16 20:20:07 HTTP/1.0 400 Bad Request Date: Tue, 09 Oct 2012 20:46:31 GMT Server: Apache/2.2.22 (Unix) X-Web-Node: www204 Access-Control-Allow-Origin: * Access-Control-Allow-Methods: POST, GET, OPTIONS Access-Control-Max-Age: 86400 Cache-Control: max-age=10 Expires: Tue, 09 Oct 2012 20:46:42 GMT Content-Length: 114 Connection: close Content-Type: text/xml; charset=utf-8; <?xml version="1.0" encoding="utf-8"?> <lfm status="failed"> <error code="6"> Track not found </error> </lfm> The question that puzzles me is am I overseeing anything related to setting the property of the tidhttp control? How can I stop the well-formated URL i'm composing in the application from getting wrongfully sent to the server? Thanks.

    Read the article

  • Transferring Data Directly between 2 Connections in Indy (TIdContext)

    - by killercode
    ive a sever running TIdTCPServer, and Client Using Web Browser (or any other software) to Communicate, i dunno the protocol, but what im trying to do is to Send The Data between the client and another Connection (Both Connected to the same TIdTCPServer) for example the data sent by the first client is transmitted to the second client, and the data sent by the second client is transmitted to the first client, like a proxy (i cant really use a proxy server since its just this one condition) and the TIdTCPServer should still be receiving other clients and processing their data. i stumbled upon the first line of code, since TIdContext.Connection.Socket.ReadLn requires a Delimiter, and the Client's Protocol is unknown to the server. any ideas? thanks.

    Read the article

  • I am Unable to Post Xml to Linkedin Share API

    - by Vijesh V.Nair
    I am using Delphi 2010, with Indy 10.5.8(svn version) and oAuth.pas from chuckbeasley. I am able to collect token with app key and App secret, authorize token with a web page and Access the final token. Now I have to post a status with Linkedin’s Share API. I am getting a unauthorized response. My request and responses are giving bellow. Request, POST /v1/people/~/shares HTTP/1.0 Content-Encoding: utf-8 Content-Type: text/xml; charset=us-ascii Content-Length: 999 Authorization: OAuth oauth_consumer_key="xxx",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1340438599",oauth_nonce="BB4C78E0A6EB452BEE0FAA2C3F921FC4",oauth_version="1.0",oauth_token="xxx",oauth_signature="Pz8%2FPz8%2FPz9ePzkxPyc%2FDD82Pz8%3D" Host: api.linkedin.com Accept: text/html, */* Accept-Encoding: identity User-Agent: Mozilla/3.0 (compatible; Indy Library) %3C%3Fxml+version=%25221.0%2522%2520encoding%253D%2522UTF-8%2522%253F%253E%253Cshare%253E%253Ccomment%253E83%2525%2520of%2520employers%2520will%2520use%2520social%2520media%2520to%2520hire%253A%252078%2525%2520LinkedIn%252C%252055%2525%2520Facebook%252C%252045%2525%2520Twitter%2520%255BSF%2520Biz%2520Times%255D%2520http%253A%252F%252Fbit.ly%252FcCpeOD%253C%252Fcomment%253E%253Ccontent%253E%253Ctitle%253ESurvey%253A%2520Social%2520networks%2520top%2520hiring%2520tool%2520-%2520San%2520Francisco%2520Business%2520Times%253C%252Ftitle%253E%253Csubmitted-url%253Ehttp%253A%252F%252Fsanfrancisco.bizjournals.com%252Fsanfrancisco%252Fstories%252F2010%252F06%252F28%252Fdaily34.html%253C%252Fsubmitted-url%253E%253Csubmitted-image-url%253Ehttp%253A%252F%252Fimages.bizjournals.com%252Ftravel%252Fcityscapes%252Fthumbs%252Fsm_sanfrancisco.jpg%253C%252Fsubmitted-image-url%253E%253C%252Fcontent%253E%253Cvisibility%253E%253Ccode%253Eanyone%253C%252Fcode%253E%253C%252Fvisibility%253E%253C%252Fshare%253E Response, HTTP/1.1 401 Unauthorized Server: Apache-Coyote/1.1 x-li-request-id: K14SWRPEPL Date: Sat, 23 Jun 2012 08:07:17 GMT Vary: * x-li-format: xml Content-Type: text/xml;charset=UTF-8 Content-Length: 341 Connection: keep-alive <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <error> <status>401</status> <timestamp>1340438838344</timestamp> <request-id>K14SWRPEPL</request-id> <error-code>0</error-code> <message>[unauthorized]. OAU:xxx|nnnnn|*01|*01:1340438599:Pz8/Pz8/Pz9ePzkxPyc/DD82Pz8=</message> </error> Please help. Regards, Vijesh Nair

    Read the article

  • Sending and receiving a TMemoryStream using IdTCPClient and IdTCPServer

    - by Martin Melka
    I found Remy Lebeau's chat demo of IdTCP components in XE2 and I wanted to play with it a little bit. (It can be found here) I would like to send a picture using these components and the best approach seems to be using TMemoryStream. If I send strings, the connection works fine, the strings are transmitted successfully, however when I change it to Stream instead, it doesn't work. Here is the code: Server procedure TMainForm.IdTCPServerExecute(AContext: TIdContext); var rcvdMsg: string; ms:TMemoryStream; begin // This commented code is working, it receives and sends strings. // rcvdMsg:=AContext.Connection.IOHandler.ReadLn; // LogMessage('<ServerExec> '+rcvdMsg); // // TResponseSync.SendResponse(AContext, rcvdMsg); try ms:=TMemoryStream.Create; AContext.Connection.IOHandler.ReadStream(ms); ms.SaveToFile('c:\networked.bmp'); except LogMessage('Failed to receive',clred); end; end; Client procedure TfrmMain.Button1Click(Sender: TObject); var ms: TMemoryStream; bmp: TBitmap; pic: TPicture; s: string; begin // Again, this code is working for sending strings. // s:=edMsg.Text; // Client.IOHandler.WriteLn(s); ms:=TMemoryStream.Create; pic:=TPicture.Create; pic.LoadFromFile('c:\Back.png'); bmp:=TBitmap.Create; bmp.Width:=pic.Width; bmp.Height:=pic.Height; bmp.Canvas.Draw(0,0,pic.Graphic); bmp.SaveToStream(ms); ms.Position:=0; Client.IOHandler.Write(ms); ms.Free; end; When I try to send the stream from the client, nothing observable happens (breakpoint in the OnExecute doesn't fire). However, when closing the programs(after sending the MemoryStream), two things happen: If the Client is closed first, only then does the except part get processed (the log displays the 'Failed to receive' error. However, even if I place a breakpoint on the first line of the try-except block, it somehow gets skipped and only the error is displayed). If the Server is closed first, the IDE doesn't change back from debug, Client doesn't change its state to disconnected (as it normally does when server disconnects) and after the Client is closed as well, an Access Violation error from the Server app appears. I guess this means that there is a thread of the Server still running and maintaining the connection. But no matter how much time i give it, it never completes the task of receiving the MemoryStream. Note: The server uses IdSchedulerOfThreadDefault and IdAntiFreeze, if that matters. As I can't find any reliable source of help for the revamped Indy 10 (it all appears to apply for the older Indy 10, or even Indy 9), I hope you can tell me what is wrong. Thanks - ANSWER - SERVER procedure TMainForm.IdTCPServerExecute(AContext: TIdContext); var size: integer; ms:TMemoryStream; begin try ms:=TMemoryStream.Create; size:=AContext.Connection.IOHandler.ReadLongInt; AContext.Connection.IOHandler.ReadStream(ms, size); ms.SaveToFile('c:\networked.bmp'); except LogMessage('Failed to receive',clred); end; end; CLIENT procedure TfrmMain.Button1Click(Sender: TObject); var ms: TMemoryStream; bmp: TBitmap; pic: TPicture; begin ms:=TMemoryStream.Create; pic:=TPicture.Create; pic.LoadFromFile('c:\Back.png'); bmp:=TBitmap.Create; bmp.Width:=pic.Width; bmp.Height:=pic.Height; bmp.Canvas.Draw(0,0,pic.Graphic); bmp.SaveToStream(ms); ms.Position:=0; Client.IOHandler.Write(ms, 0, True); ms.Free; end;

    Read the article

  • How to simulate a dial-up connection for testing purposes?

    - by mawg
    I have to code a server app where clients open a TCP/IP socket, send some data and close the connection. The data packets are small < 100 bytes, however there is talk of having them batch their transactions and send multiple packets. How can I best simulate a dial-up ut connection (using Delphy & Indy components, just FYI)? Is it as simple as open connection wait a while (what is the definition of "a while"?) close connection

    Read the article

  • BroadCast Messages to multiple client on the same machine

    - by Christopher Chase
    I need to have a server on one machine that broadcasts a message sever second or so, Kind of like a service discovery. The message needs to be received by multiple client processes that could be on the same machine or different machines. Im using delphi7, with indy 9.0.18 where im stuck is if i should be using UDP or IP MultiCast or if its even possible... Ive managed to get it to work with IP Multi Cast with one client per machine, but even after many trys with different bindings.. max/min ports etc, i cant seem to find a solution.

    Read the article

  • MultiCast Messages to multiple clients on the same machine

    - by Christopher Chase
    Im trying to write a server/service that broadcasts a message on the lan ever second or so, Kind of like a service discovery. The message needs to be received by multiple client programs that could be on the same machine or different machines. But there could be more than one program on each machine running at the same time. Im using delphi7, with indy 9.0.18 where im stuck is if i should be using UDP or IP MultiCast or if its even possible... Ive managed to get it to work with IP Multi Cast with one client per machine, but even after many trys with different bindings.. max/min ports etc, i cant seem to find a solution.

    Read the article

  • Terminate an inactive socket connection from TIdTCPServer

    - by A.J.
    We have an application which listens for incoming TCP requests using the Indy 10.1.1 components that ship with Delphi 2007. Occassionally we receive incoming connections which are not from our client application. Typically, one of two things happens: 1) the connection is terminated by the client before any data is received, or 2) data is received which we're not expecting and we manually terminate the connection. However, we've received connections where no data is received and appear to persist until the client terminates the connection from their end. Is there a way to terminate such a connection from the server if no data is received after a specified amount of time?

    Read the article

  • Delphi: Why does IdHTTP.ConnectTimeout make requests slower?

    - by K.Sandell
    I discovered that when setting the ConnectTimeoout property for a TIdHTTP component, it makes the requests (GET and POST) become about 120ms slower? Why is this, and can I avoid/bypass this somehow? Env: D2010 with shipped Indy components, all updates installed for D2010. OS is WinXP (32bit) SP3 with most patches... My timing routine is: Procedure DoGet; Var Freq,T1,T2 : Int64; Cli : TIdHTTP; S : String; begin QueryPerformanceFrequency(Freq); Try QueryPerformanceCounter(T1); Cli := TIdHTTP.Create( NIL ); Cli.ConnectTimeout := 1000; // without this we get < 15ms!! S := Cli.Get('http://127.0.0.1/empty_page.php'); Finally FreeAndNil(Cli); QueryPerformanceCounter(T2); End; Memo1.Lines.Add('Time = '+FormatFloat('0.000',(T2-T1)/Freq) ); End; With the ConnectTimeout set in code I get avg. times of 130-140ms, without it's about 5-15ms ...

    Read the article

  • delphi post 'illegal access' error

    - by paul
    hello all im making some delphi simple software which using Idhttp module in indy. i want to access ' http://mybuddy.buddybuddy.co.kr/userinfo/UserInfo.asp ' this page by use idhttp's post function. to open this webpage firstly have to login(http://user.buddybuddy.co.kr/Login/Login.asp), so i was logged in but problem is after logged in webpage i can see another login page but when try to login(http://user.buddybuddy.co.kr/usercheck/UserCheckPWExec.asp) , i encountered some error message 'illegal access'. if anyone help me much appreciate! begin sl.Clear; sl.Add('ID=ph896011'); sl.add('PWD=pk1089'); sl.add('SECCHK=0'); IdHTTP1.HandleRedirects := True; IdHTTP1.Request.ContentType := 'application/x-www-form-urlencoded'; memo1.Text:=idhttp1.Post('http://user.buddybuddy.co.kr/Login/Login.asp',sl); if pos('top.location =',Memo1.Text)> 0 then begin application.ProcessMessages; sleep(1000); Memo1.Text:= ''; sleep(300); sl2.Clear; sl2.Add('PASSWD=pk1089' ); Memo2.Text := IdHTTP1.Post('http://user.buddybuddy.co.kr/usercheck/UserCheckPWExec.asp', sl2); result.Caption := 'login success' ; sleep(300); Memo1.Text := ''; //memo1.Text := IdHTTP1.Get('https://user.buddybuddy.co.kr/Login/Logout.asp'); //Sleep(1000); end;

    Read the article

  • Delphi: Get MAC of Router

    - by Daniel Marschall
    Hello, I am using Delphi and I want to determinate the physical MAC address of a network device in my network, in this case the Router itself. My code: var idsnmp: tidsnmp; val:string; begin idsnmp := tidsnmp.create; try idsnmp.QuickSend('.1.3.6.1.2.1.4.22.1.2', 'public', '10.0.0.1', val); showmessage(val); finally idsnmp.free; end; end; where 10.0.0.1 is my router. Alas, QuickSend does always send "Connection reset by peer #10054". I tried to modify the MIB-OID and I also tried the IP 127.0.0.1 which connection should never fail. I did not find any useable Tutorials about TIdSNMP at Google. :-( Regards Daniel Marschall

    Read the article

  • Why can't I fetch an AOL captcha image in my Delphi program?

    - by Bill
    New demo code: I am trying to get the captcha image from a AOL, and i keep getting an error 418. unit imageunit; /// /// h t t p s://new.aol.com/productsweb/ /// interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, IdIOHandler, IdIOHandlerSocket, IdIOHandlerStack, IdSSL, IdSSLOpenSSL, IdIntercept, IdZLibCompressorBase, IdCompressorZLib, IdCookieManager, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP,jpeg,GIFImg, ExtCtrls, PerlRegEx; type TForm2 = class(TForm) IdHTTP1: TIdHTTP; IdCookieManager1: TIdCookieManager; IdCompressorZLib1: TIdCompressorZLib; IdConnectionIntercept1: TIdConnectionIntercept; IdSSLIOHandlerSocketOpenSSL1: TIdSSLIOHandlerSocketOpenSSL; Panel1: TPanel; Image1: TImage; Panel2: TPanel; Button1: TButton; PerlRegEx1: TPerlRegEx; Memo1: TMemo; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form2: TForm2; implementation {$R *.dfm} function getaimcaptchaimage(data:string):string; var Regex: TPerlRegEx; ResultString: string; begin Regex := TPerlRegEx.Create(nil); Regex.RegEx := '= 1 then begin ResultString := Regex.SubExpressions[1]; end; result:=Resultstring; end; end; procedure TForm2.Button1Click(Sender: TObject); var JPI : TJPEGImage; streamdata:TMemoryStream; SStream: Tstringstream; website:string; begin streamdata := TMemoryStream.Create; SStream := tstringstream.Create ( '' ); try idhttp1.Get('h t t p s://new.aol.com/productsweb/',SStream); memo1.Text:=UTF8ToWideString ( SStream.DataString ); website:='h t t p s://new.aol.com/productsweb/WordVerImage'+getaimcaptchaimage( UTF8ToWideString ( SStream.DataString )); form2.Caption:=website; idhttp1.Get(website, Streamdata); Except { Handle exceptions } On E : Exception Do Begin MessageDlg('Exception: '+E.Message,mtError, [mbOK], 0); End; End; //h t t p s://new.aol.com/productsweb/WordVerImage?20890843 //h t t p s://new.aol.com/productsweb/WordVerImage?91868359 /// /// gives error 418 unused /// streamdata.Position := 0; JPI := TJPEGImage.Create; Try JPI.LoadFromStream ( streamdata ); Finally Image1.Picture.Assign ( JPI ); JPI.Free; streamdata.Free; End; end; end. Form: object Form2: TForm2 Left = 0 Top = 0 Caption = 'Form2' ClientHeight = 247 ClientWidth = 480 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] OldCreateOrder = False PixelsPerInch = 96 TextHeight = 13 object Panel1: TPanel Left = 0 Top = 41 Width = 480 Height = 206 Align = alClient TabOrder = 0 object Image1: TImage Left = 1 Top = 1 Width = 478 Height = 115 Align = alClient ExplicitLeft = 5 ExplicitTop = 17 ExplicitWidth = 200 ExplicitHeight = 70 end object Memo1: TMemo Left = 1 Top = 116 Width = 478 Height = 89 Align = alBottom TabOrder = 0 ExplicitLeft = 80 ExplicitTop = 152 ExplicitWidth = 185 end end object Panel2: TPanel Left = 0 Top = 0 Width = 480 Height = 41 Align = alTop TabOrder = 1 object Button1: TButton Left = 239 Top = 6 Width = 75 Height = 25 Caption = 'Button1' TabOrder = 0 OnClick = Button1Click end end object IdHTTP1: TIdHTTP Intercept = IdConnectionIntercept1 IOHandler = IdSSLIOHandlerSocketOpenSSL1 MaxAuthRetries = 100 AllowCookies = True HandleRedirects = True RedirectMaximum = 100 ProxyParams.BasicAuthentication = False ProxyParams.ProxyPort = 0 Request.ContentLength = -1 Request.Accept = 'image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-s' + 'hockwave-flash, application/cade, application/xaml+xml, applicat' + 'ion/vnd.ms-xpsdocument, application/x-ms-xbap, application/x-ms-' + 'application, */*' Request.BasicAuthentication = False Request.Referer = 'http://www.yahoo.com' Request.UserAgent = 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.1) Gecko/201001' + '22 firefox/3.6.1' HTTPOptions = [hoForceEncodeParams] CookieManager = IdCookieManager1 Compressor = IdCompressorZLib1 Left = 40 Top = 160 end object IdCookieManager1: TIdCookieManager Left = 360 Top = 136 end object IdCompressorZLib1: TIdCompressorZLib Left = 408 Top = 56 end object IdConnectionIntercept1: TIdConnectionIntercept Left = 304 Top = 72 end object IdSSLIOHandlerSocketOpenSSL1: TIdSSLIOHandlerSocketOpenSSL Intercept = IdConnectionIntercept1 MaxLineAction = maException Port = 0 DefaultPort = 0 SSLOptions.Mode = sslmUnassigned SSLOptions.VerifyMode = [] SSLOptions.VerifyDepth = 0 Left = 192 Top = 136 end object PerlRegEx1: TPerlRegEx Options = [] Left = 120 Top = 56 end end If you go to h t t p s://new.aol.com/productsweb/ you will notice the captcha image has a url like h t t p s://new.aol.com/productsweb/WordVerImage?91868359 I put that url in the edit box and get an error. What is wrong with this code? *take the extra spaces out of the URLs

    Read the article

  • AContext.data can be nil?

    - by waza123
    In this code, as you see on Connect, AContext.Data is filled with something TmyTThreadList = class(TThreadList) id: integer; end; var unique_id:integer; procedure TfrmTestIdTCPServer.IdTCPServerConnect(AContext: TIdContext); begin CS.Enter; try inc(unique_id); finally CS.Leave; end; AContext.Data := myTThreadList.Create; list := myTThreadList(AContext.Data).LockList; try myTThreadList(AContext.Data).id := my_unique_id; list.Add(myTThreadList(AContext.Data)); finally myTThreadList(AContext.Data).UnlockList; end; end; then on disconnect, coder is checking here for Acontext.Data < nil procedure TfrmTestIdTCPServer.IdTCPServerDisconnect(AContext: TIdContext); var begin if AContext.Data <> nil then begin The question is, why he is checking for nil ? Thanks. EDIT: I'm asking this, because when I do the same, onExecute I access AContext.Data , and sometimes (when in same time is connecting many clients) AContext.Data is empty, access violation appears.

    Read the article

  • Why is Gmail not showing my text/html alternative?

    - by Stijn Sanders
    I'm creating an outgoing e-mail message (TIdMessage) with add two TIdText objects, one with ContentType:='text/plain' and one ContentType:='text/html', and also a TIdAttachment object. This seems to work for Outlook, which shows the HTML content, but for some odd reason, GMail keeps showing me the text/plain version by default. I've tried adding the text/html version first, I've tried adding '; charset=iso-8859-1' to the content type string, but I can't seem to find what else is different with other e-mails that GMail is showing the HTML from rightaway.

    Read the article

  • Indy10 Deadlock at TCPServer

    - by user1769184
    to write information on the processing state to the GUI inside a tcpserver.onexecute(..) function , i used the following command sequence ExecuteDUMMYCommand(Global_Send_Record); BitMap_PaintImageProcess; TThread.Synchronize(nil, BitMap_PaintImageProcess); The code is working well on some machines, but on a few it fails. The code execution stops atTThread.Synchronize command. I guess on these machines the function call is trapped inside a deadlock Any chance to figure out the real problem behind ? The procedure BitMap_PaintImageProcess , here I create a Bitmap and do a lot of painting stuff , but is seems that this code is never executed ?

    Read the article

  • Getting Indy Error "Could not bind socket. Address and port are already in use"

    - by M Schenkel
    I have developed a Delphi web server application (TWebModule). It runs as a ISAPI DLL on Apache under Windows. The application in turn makes frequent https calls to other web sites using the Indy TIdHTTP component. Periodically I get this error when using the TIdHTTP.get method: Could not bind socket. Address and port are already in use Here is the code: IdSSLIOHandlerSocket1 := TIdSSLIOHandlerSocketOpenSSL.create(nil); IdHTTP := TIdHTTP.create(nil); idhttp.handleredirects := True; idhttp.OnRedirect := DoRedirect; with IdSSLIOHandlerSocket1 do begin SSLOptions.Method := sslvSSLv3; SSLOptions.Mode := sslmUnassigned; SSLOptions.VerifyMode := []; SSLOptions.VerifyDepth := 2; end; with IdHTTP do begin IOHandler := IdSSLIOHandlerSocket1; ProxyParams.BasicAuthentication := False; Request.UserAgent := 'Test Google Analytics Interface'; Request.ContentType := 'text/html'; request.connection := 'keep-alive'; Request.Accept := 'text/html, */*'; end; try idhttp.get('http://www.mysite.com......'); except ....... end; IdHTTP.free; IdSSLIOHandlerSocket1.free; I have read about the reusesocket method, which can be set on both the TIdHttp and TIdSSLLIOHandlerSocketOpenSSL objects. Will setting this to rsTrue solve my problems? I ask because I have not been able to replicate this error, it just happens periodically. Other considerations: I know multiple instances of TWebModule are being spawned. Would wrapping all calls to TIdHttp.get within a TCriticalSection solve the problem?

    Read the article

  • What's the simplest way to call Http GET url using Delphi?

    - by Mohammed Nasman
    There's a web services I want to call in my application, I can use it with importing the WSDL or by just use "HTTP GET" with the URL and parameters, so I prefer the later because it's simple thing. I know I can use indy idhttp.get, to do the job, but this is very simple thing and I don't want to add complex indy code to my application. UPDATE: sorry if I was not clear, I meant by "not to add complex indy code", that I don't want add indy components for just this simple task, and prefer more lighter way for that.

    Read the article

  • Programming test for ASP.NET C# developer job - Opinions please!

    - by Indy
    Hi all, We are hiring a .NET C# developer and I have developed a technical test for the candidates to complete. They have an hour and it has two parts, some knowledge based questions covering asp.net, C# and SQL and a small practical test. I'd appreciate feedback on the test, is it sufficient to test the programmers ability? What would you change if anything? Part One. What the are events fired as part of the ASP.NET Page lifecycle. What interesting things can you do at each? How does ViewState work and why is it either useful or bad? What is a common way to create web services in ASP.NET 2.0? What is the GAC? What is boxing? What is a delegate? The C# keyword .int. maps to which .NET type? Explain the difference between a Stored Procedure and a Trigger? What is an OUTER Join? What is @@IDENTITY? Part Two: You are provided with the Northwind Database and the attached DB relationship diagram. Please create a page which provides users with the following functionality. You don’t need to be too concerned with the presentation detail of the page. Select a customer from a list, and see all the orders placed by that customer. For the same customer, find all their orders which are Beverages and the quantity is more than 5. I was aware of setting the right balance of difficulty on this as there is an hour's test. I was able to complete the practical test in under 30 mins using SQLDatasource and the query designer in visual studio and the test questions, I am looking to see how they approach it logically and whether they use the tools available. Many thanks!

    Read the article

  • How do I transform a single colmn list to item matrix in R?

    - by Indy
    I currently have data that is in the following format (note, this is 1 column, 4 row matrix): aa|bb bb|cc|ee|ee cc cc|ee and I want it displayed so that the column names are: aa, bb, cc, dd, and ee. And I want there to be 4 row such that each row counts the number of times each string was present in the matching row above. ie) aa bb cc dd ee 1 1 0 0 0 0 1 1 0 2 0 0 1 0 0 0 0 1 0 1 Does anyone know how to do this in R? I would post my attempt, but it is just getting ugly and complicated. Any help would be much appreciated. Thanks in advance.

    Read the article

  • Suggestions on writing a TCP IP messaging system (Client/Server) using Delphi 2010

    - by Shane
    I would like to write a messaging system using TCP IP in Delphi 2010. I would like to hear what my best options are for using the standard delphi 2010 components/indy components for doing this. I would like to write a server which does the listening and forwarding of messages to all machines on the network running a client. 1.) a.) clients can send a message to server to be forwarded to all other clients b.) clients listen for messages from other senders (via server) and displays messages. 2.) a.) Server can send a message to all clients b.) Server forwards any messages from clients to all other clients thanks for any suggestions NOTE: I am not writing a instant messaging or chat program. This is merely a system where users can send alerts/messages to other users - they can not reply to each other! NO commercial, shareware, etc links - please! I would like to hear about how you would go about writing this type of system and what approachs you would take, and possibly the TCP IP messaging architecture you would use. Whether it be straight Winows API, Indy components, etc, etc.

    Read the article

  • Free POP3 .NET library?

    - by Shawn Simon
    Looking for a POP3 Client for .NET that basically just lets me log into a server and grab all the emails out, and maybe send some. I grabbed Indy.Sockets off of CodePlex and got it running but its throwing errors trying to decode the mail headers. Really anything is fine if it works.

    Read the article

< Previous Page | 1 2 3  | Next Page >