Re[2]: [twsocket] Receive result of the first ReceiveStr() call twice-not resolved

2005-06-02 Thread Jack
; Auteur du freeware MidWare - Multi-tiers framework > http://www.overbyte.be > - Original Message - > From: "Jack" <[EMAIL PROTECTED]> > To: "ICS support mailing" > Sent: Thursday, June 02, 2005 12:39 AM > Subject: Re: [twsocket] Receive r

Re: [twsocket] Receive result of the first ReceiveStr() call twice-not resolved

2005-06-02 Thread Francois Piette
r du freeware MidWare - Multi-tiers framework http://www.overbyte.be - Original Message - From: "Jack" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Thursday, June 02, 2005 12:39 AM Subject: Re: [twsocket] Receive result of the first ReceiveStr() call tw

Re: [twsocket] Receive result of the first ReceiveStr() call twice -not resolved

2005-06-01 Thread Jack
This problem is still bugging me. I did some further testing and find some strange things. In the OnDataAvailable event handler, I call the function below to get HTTP status code. The HttpReply is the string variable I get from ReceiveStr() call. I find that as long as I call this function, I get a

Re: Re[2]: [twsocket] Receive result of the first ReceiveStr() call twice -not resolved

2005-05-21 Thread Francois PIETTE
; To: "Francois Piette" <[EMAIL PROTECTED]> Sent: Friday, May 20, 2005 10:58 PM Subject: Re[2]: [twsocket] Receive result of the first ReceiveStr() call twice -not resolved > Hello Francois, > > Thanks for offering to look at my code. > > I zipped the (simplified) proje

Re[2]: [twsocket] Receive result of the first ReceiveStr() call twice -not resolved

2005-05-20 Thread Jack
ti-tier framework, freeware) FP> http://www.overbyte.be FP> - Original Message - FP> From: "Jack" <[EMAIL PROTECTED]> FP> To: "ICS support mailing" FP> Sent: Thursday, May 19, 2005 9:31 PM FP> Subject: [twsocket] Receive result of the first Rece

Re: [twsocket] Receive result of the first ReceiveStr() call twice -not resolved

2005-05-20 Thread Francois Piette
http://www.overbyte.be - Original Message - From: "Jack" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Thursday, May 19, 2005 9:31 PM Subject: [twsocket] Receive result of the first ReceiveStr() call twice -not resolved > I celebrated a little too early. I

[twsocket] Receive result of the first ReceiveStr() call twice - not resolved

2005-05-19 Thread Jack
I celebrated a little too early. I am getting this problem again in further testing after I changed Close() to CloseDelayed(); The difference is, I'm not getting result of the first ReceiveStr() twice. Instead, I get the result of the second ReceiveStr() twice. I think this is because CloseDelayed(

Re: Re[4]: [twsocket] Receive result of the first ReceiveStr() call twice

2005-05-19 Thread Francois PIETTE
pport mailing" Sent: Thursday, May 19, 2005 4:53 PM Subject: Re[4]: [twsocket] Receive result of the first ReceiveStr() call twice > Francois, thanks! This fixed the problem! It's actually in the FAQ: > > - CloseDelayed > > Is in most cases the preferred way. It will post

Re: [twsocket] Receive result of the first ReceiveStr() call twice

2005-05-19 Thread Francois PIETTE
> > I do not agree. Those operations translate to sending a > > message to the Windows control. There is no call to the message pump. > > If you override WndProc of the form, and you place a breakpoint inside your > custom WndProc. Then you can see that it is called imidiately when you > update a c

RE: [twsocket] Receive result of the first ReceiveStr() call twice

2005-05-19 Thread Bjørnar Nielsen
> I do not agree. Those operations translate to sending a > message to the Windows control. There is no call to the message pump. If you override WndProc of the form, and you place a breakpoint inside your custom WndProc. Then you can see that it is called imidiately when you update a caption of

Re[4]: [twsocket] Receive result of the first ReceiveStr() call twice

2005-05-19 Thread Jack
Francois, thanks! This fixed the problem! It's actually in the FAQ: - CloseDelayed Is in most cases the preferred way. It will post a message to itself to close the TWSocket. This means that the socket closure is done outside the code that calls the CloseDelayed, meaning a while later. The messag

Re: [twsocket] Receive result of the first ReceiveStr() call twice

2005-05-19 Thread Francois Piette
> > ... Never call directly or indirectly ( ShowMessage, > > MessageBox,...) from an event handler... > > Updating the caption of a label or the content of a memo could > also make the message pump to be called. I do not agree. Those operations translate to sending a message to the Windows contro

Re: Re[2]: [twsocket] Receive result of the first ReceiveStr() call twice

2005-05-19 Thread Francois Piette
Use CloseDelayed instead of Close. -- [EMAIL PROTECTED] http://www.overbyte.be - Original Message - From: "Jack" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Thursday, May 19, 2005 12:35 AM Subject: Re[2]: [twsocket] Receive result of the first Receive

Re: Re[2]: [twsocket] Receive result of the first ReceiveStr() call twice

2005-05-19 Thread Francois Piette
rocessMessages to get the kind of problem you mention. -- [EMAIL PROTECTED] http://www.overbyte.be - Original Message - From: "Jack" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Thursday, May 19, 2005 12:28 AM Subject: Re[2]: [twsocket] Receive res

Re[3]: [twsocket] Receive result of the first ReceiveStr() call twice

2005-05-18 Thread Wilfried Mestdagh
Hello Jack, > the first string in both cases. So it shouldn't be the server > sending the string twice. No but you close the connection. When you close TWSocket will empty his receiving buffer if there is yet still data in it. So I think that is what happening. --- Rgds, Wilfried http://www.mest

RE: [twsocket] Receive result of the first ReceiveStr() call twice

2005-05-18 Thread Bjørnar Nielsen
> ... Never call directly or indirectly ( ShowMessage, > MessageBox,...) from an event handler... Updating the caption of a label or the content of a memo could also make the message pump to be called. Regards Bjørnar -- To unsubscribe or change your settings for TWSocket mailing list plea

Re[2]: [twsocket] Receive result of the first ReceiveStr() call twice

2005-05-18 Thread Jack
Hello Wilfried, Sure. Below is my event handler code. Hope I'm doing something wrong, otherwise, it's really strange. TProxyChecker is the owner object of the TProxySocket object array. TProxySocket is derived from TWSocket. procedure TProxyChecker.WSocketDataAvailable(Sender: TObject; ErrCode: W

Re[2]: [twsocket] Receive result of the first ReceiveStr() call twice

2005-05-18 Thread Jack
Hello Francois, Thanks for the quick reply. No, I don't have any message handler of my own in my code. I create an object as the owner of an array of TWSocket objects. I assign the even handler of the TWSocket objects to a member function of that owner object and call ReceiveStr() in the OnDataAv

Re: [twsocket] Receive result of the first ReceiveStr() call twice

2005-05-18 Thread Francois PIETTE
t;ICS support mailing" Sent: Wednesday, May 18, 2005 8:48 PM Subject: [twsocket] Receive result of the first ReceiveStr() call twice > Hello Francois and all, > > I'm using a TWSocket client in LineMode with LineEnd set to #13#10. > I connect to a HTTP proxy server using CONN

Re: [twsocket] Receive result of the first ReceiveStr() call twice

2005-05-18 Thread Wilfried Mestdagh
Hello Jack, Can you show your OnDataAvailable handler ? Eventually download SocketSpy from 'user made' page and 'hang' it between client and server. Then you see exacly what is sent by server. --- Rgds, Wilfried http://www.mestdagh.biz Wednesday, May 18, 2005, 20:48, Jack wrote: > Hello Francoi

[twsocket] Receive result of the first ReceiveStr() call twice

2005-05-18 Thread Jack
Hello Francois and all, I'm using a TWSocket client in LineMode with LineEnd set to #13#10. I connect to a HTTP proxy server using CONNECT command. I then get a reply back from the HTTP proxy from ReceiveStr() Things look OK except that I am receiving the data from the first ReceiveStr() call twi