[twsocket] Need help on remote debugging of ICS-based server

2007-04-06 Thread Fastream Technologies
Hello,

I have a customer in Russia with a dedicated/fast internet connection. Their 
web site gets 400 concurrent users at any time. Now, he constantly complains 
about a crash situation which madexcept cannot capture. As you can guess, I 
am unable to reproduce the problem here. My plan is to install BDS2006 Trial 
version on their server and do some remote debugging BUT I do not want to 
transmit the source code over the internet. Is there a good solution for 
this problem? IOW, I will include the debug information to the project, then 
transmit the exe and do the debugging remotely from my machine in Turkey. 
PLEASE HELP! ;-}

Best Regards,

SZ 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Need help on remote debugging of ICS-based server

2007-04-06 Thread Francois Piette
Remote debugging is what you need. But I think it is gone out of BDS2006
(Not sure). It is back in Delphi 2007. But since most of your code is C++,
you'll have to wait until Cogswell is out (Before the summer as far as I
know). Without remote debugger, I don't know how you can avoir copying the
source code to the target machine, at least the part of the code you want to
debug.

Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be


- Original Message - 
From: Fastream Technologies [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Friday, April 06, 2007 9:28 AM
Subject: [twsocket] Need help on remote debugging of ICS-based server


 Hello,

 I have a customer in Russia with a dedicated/fast internet connection.
Their
 web site gets 400 concurrent users at any time. Now, he constantly
complains
 about a crash situation which madexcept cannot capture. As you can guess,
I
 am unable to reproduce the problem here. My plan is to install BDS2006
Trial
 version on their server and do some remote debugging BUT I do not want to
 transmit the source code over the internet. Is there a good solution for
 this problem? IOW, I will include the debug information to the project,
then
 transmit the exe and do the debugging remotely from my machine in Turkey.
 PLEASE HELP! ;-}

 Best Regards,

 SZ

 -- 
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://www.elists.org/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Need help on remote debugging of ICS-based server

2007-04-06 Thread Fastream Technologies
Hello,

At this page: 
http://shop.borland.com/dr/v2/ec_Main.Entry17c?SID=39696SP=10023CID=0PID=772683PN=1V1=772683CUR=840DSP=PGRP=0ABCODE=CACHE_ID=0

Enterprise Edition
For the professional C or C++ developer who demands reliable, 
high-performance applications, this is the IDE you've been waiting for! 
Borland® C++Builder® 2006 delivers the latest RAD and ALM features for 
mission-critical development, including WYSIWYG Web Application Development, 
powerful new data providers, remote debugging,  Is this C++ 
product, what's included in BDS2006? How can I enable remote debugging? I 
have architect version of BCB2006 but it's not one of the versions on this 
page!

Regards,

SZ

- Original Message - 
From: Francois Piette [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Friday, April 06, 2007 10:42 AM
Subject: Re: [twsocket] Need help on remote debugging of ICS-based server


 Remote debugging is what you need. But I think it is gone out of BDS2006
 (Not sure). It is back in Delphi 2007. But since most of your code is C++,
 you'll have to wait until Cogswell is out (Before the summer as far as I
 know). Without remote debugger, I don't know how you can avoir copying the
 source code to the target machine, at least the part of the code you want 
 to
 debug.

 Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
 --
 [EMAIL PROTECTED]
 Author of ICS (Internet Component Suite, freeware)
 Author of MidWare (Multi-tier framework, freeware)
 http://www.overbyte.be


 - Original Message - 
 From: Fastream Technologies [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Friday, April 06, 2007 9:28 AM
 Subject: [twsocket] Need help on remote debugging of ICS-based server


 Hello,

 I have a customer in Russia with a dedicated/fast internet connection.
 Their
 web site gets 400 concurrent users at any time. Now, he constantly
 complains
 about a crash situation which madexcept cannot capture. As you can guess,
 I
 am unable to reproduce the problem here. My plan is to install BDS2006
 Trial
 version on their server and do some remote debugging BUT I do not want to
 transmit the source code over the internet. Is there a good solution for
 this problem? IOW, I will include the debug information to the project,
 then
 transmit the exe and do the debugging remotely from my machine in Turkey.
 PLEASE HELP! ;-}

 Best Regards,

 SZ

 -- 
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://www.elists.org/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be

 -- 
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://www.elists.org/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Threading question

2007-04-06 Thread DZ-Jay

On Apr 5, 2007, at 10:23, Éric Fleming Bonilha wrote:

 Another thing, now FSocket is being destroyed on my class destructor, 
 should I destroy it on the end of the execute method, after leaving 
 the message loop?

You should destroy FSocket at the end of the Execute method.

dZ.

-- 
DZ-Jay [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] httpcli v6 bad request

2007-04-06 Thread DZ-Jay

On Apr 5, 2007, at 13:38, Frans van Daalen wrote:

 The first postasync generate 302 from the server. As follow is set the
 httpcli will also do a get for the relocation.

What do you mean that it will do a Get for the relocation?  A 302 
relocation response just means that you have to request the resource at 
a different location.  The relocation target should be returned as the 
body on the 302 response from the server.  Also keep in mind that 
submitting a Get request instead of a Post may not work properly if the 
server expects a Post request.  I say this because you mention that you 
start with PostAsync.

 after processing of the result of that relocation
 the second postasync to the same server will generate again 302, 
 follow is
 set.

Of course, if you re-request to the original location that caused the 
302 response, you will get the same response.  Or perhaps I didn't 
understand your problem?

  This time in the code I see the response bad request. In the sniffer
 I will however see the  302 (as expected) but there is no additional 
 get to
 relocate send out by the software.

If I understand your problem, what is happening is this:  You submit a 
Post request, the server responds with 302, the HttpCli automatically 
submits a Get request to the new location, but the server rejected it, 
ignored it, or processed it incorrectly because it was expecting a Post 
request:  With a Post request, the server will receive the data in the 
request body; while with a Get request it will receive it in the 
query-string, which is in the request header.

I haven't used HttpCli in years, so I don't know how the follow 
mechanism works, but if it only performs Get requests, then you must 
not set follow, and perform the redirection using a new PostAsync 
request to the new location.

dZ.

-- 
DZ-Jay [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Need help on remote debugging of ICS-based server

2007-04-06 Thread Francois Piette
OK, looks like Remote Debugging is in BDS2006. Sorry.
Usually it is installed from the CD. The main install splash screen has an
item for it. There is a readme somewhere explaining how to install and
configure. I used remote debugging long time ago. It works nice (speed
depends on the network speed of course).

Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be


- Original Message - 
From: Fastream Technologies [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Friday, April 06, 2007 9:47 AM
Subject: Re: [twsocket] Need help on remote debugging of ICS-based server


 Hello,

 At this page:

http://shop.borland.com/dr/v2/ec_Main.Entry17c?SID=39696SP=10023CID=0PID=772683PN=1V1=772683CUR=840DSP=PGRP=0ABCODE=CACHE_ID=0

 Enterprise Edition
 For the professional C or C++ developer who demands reliable,
 high-performance applications, this is the IDE you've been waiting for!
 Borland® C++Builder® 2006 delivers the latest RAD and ALM features for
 mission-critical development, including WYSIWYG Web Application
Development,
 powerful new data providers, remote debugging,  Is this C++
 product, what's included in BDS2006? How can I enable remote debugging? I
 have architect version of BCB2006 but it's not one of the versions on this
 page!

 Regards,

 SZ

 - Original Message - 
 From: Francois Piette [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Friday, April 06, 2007 10:42 AM
 Subject: Re: [twsocket] Need help on remote debugging of ICS-based server


  Remote debugging is what you need. But I think it is gone out of BDS2006
  (Not sure). It is back in Delphi 2007. But since most of your code is
C++,
  you'll have to wait until Cogswell is out (Before the summer as far as I
  know). Without remote debugger, I don't know how you can avoir copying
the
  source code to the target machine, at least the part of the code you
want
  to
  debug.
 
  Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
  --
  [EMAIL PROTECTED]
  Author of ICS (Internet Component Suite, freeware)
  Author of MidWare (Multi-tier framework, freeware)
  http://www.overbyte.be
 
 
  - Original Message - 
  From: Fastream Technologies [EMAIL PROTECTED]
  To: ICS support mailing twsocket@elists.org
  Sent: Friday, April 06, 2007 9:28 AM
  Subject: [twsocket] Need help on remote debugging of ICS-based server
 
 
  Hello,
 
  I have a customer in Russia with a dedicated/fast internet connection.
  Their
  web site gets 400 concurrent users at any time. Now, he constantly
  complains
  about a crash situation which madexcept cannot capture. As you can
guess,
  I
  am unable to reproduce the problem here. My plan is to install BDS2006
  Trial
  version on their server and do some remote debugging BUT I do not want
to
  transmit the source code over the internet. Is there a good solution
for
  this problem? IOW, I will include the debug information to the project,
  then
  transmit the exe and do the debugging remotely from my machine in
Turkey.
  PLEASE HELP! ;-}
 
  Best Regards,
 
  SZ
 
  -- 
  To unsubscribe or change your settings for TWSocket mailing list
  please goto http://www.elists.org/mailman/listinfo/twsocket
  Visit our website at http://www.overbyte.be
 
  -- 
  To unsubscribe or change your settings for TWSocket mailing list
  please goto http://www.elists.org/mailman/listinfo/twsocket
  Visit our website at http://www.overbyte.be

 -- 
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://www.elists.org/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Listen exception

2007-04-06 Thread Engi

I talked too quickly.
I still have errors 10022 from time to time.

Here is my code:
It is correct ?


void __fastcall TThreadWORK::Execute()
{
try
{
WSocketServerWORK = new TWSocketServer(NULL);
WSocketServerWORK-Proto = tcp;
WSocketServerWORK-Port = PortIP;
WSocketServerWORK-Addr = AdrIP;
WSocketServerWORK-LineMode = true;
WSocketServerWORK-LineEnd = \r\n;
WSocketServerWORK-LingerOnOff = wsLingerOn;
WSocketServerWORK-LingerTimeout = 5000;
WSocketServerWORK-ClientClass =
__classid(TTcpSrvClientWork);
WSocketServerWORK-Banner = ;
WSocketServerWORK-OnClientConnect =
WSocketServerWORKClientConnect;
WSocketServerWORK-OnClientDisconnect =
WSocketServerWORKClientDisconnect;
}
catch(Sysutils::Exception e)
{
if (WSocketServerWORK) delete WSocketServerWORK;
WSocketServerWORK = NULL;
Terminate();
return;
}

try
{
WSocketServerWORK-Listen();
}
catch(Sysutils::Exception e)
{
if (WSocketServerWORK) delete WSocketServerWORK;
WSocketServerWORK = NULL;
Terminate();
return;
}

while (!Terminated)
{
...
}

WSocketServerWORK-ShutDown(0);
delete WSocketServerWORK;
}


 

-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la
part de Engi
Envoyé : mercredi 4 avril 2007 14:27
À : 'ICS support mailing'
Objet : Re: [twsocket] Listen exception


Francois,

Thanks for this explanations.
I moved all the lines from constructor to Execute() method and all is fine
now.

Engi

-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la
part de Francois Piette Envoyé : mercredi 4 avril 2007 13:15 À : ICS support
mailing Objet : Re: [twsocket] Listen exception

 No, I create the instance in the thread constructor.

Any constructor for TThread class is executed in the context of the creating
[likely main] thread, not the [future] created thread ! The new thread
context exists only at the very beginning of the Execute method. So you must
create any event-driven message based component from the Execute method or
their events will run in the creating [main] thread and cause lot's of
trouble when you access the component from the context of the created
thread.

The execution context [thread context] has nothing to do with the fact that
the executed code is part or not of the TThread class. It is only related if
TThread.Execute is in the call stack. This is a frequent error for newbies
in multithreading.

 Must I create instance in Execute method

Yes, you have.

 or deplace listening method in constructor ?

You must too, or in any function/procedure called directly or indirectly
from the Execute method. That is you have the Execute method in the call
stack.


If you are unsure about the thread context a given function is run, you may
call GetCurrentThreadID and compare with the value f the same function
called at the very beginning of the Execute method.

Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware) Author of MidWare
(Multi-tier framework, freeware) http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list please goto
http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list please goto
http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Port vs LocalPort

2007-04-06 Thread Engi
Hi,
 
What is different between Port and LocalPort property ?
Same for Addr and LocalAddr ?
 
TIA,
Engi
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Port vs LocalPort

2007-04-06 Thread Francois PIETTE
 What is different between Port and LocalPort property ?

A socket has two ends: a local end and a remote end. When you connect to a 
server, you specify the remote port and the OS select the local port for you 
(You can also force a given local port).

 Same for Addr and LocalAddr ?

Same for address: one is the remote and the other is the local (there may be 
several addresses for a computer: one per network interface).

--
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be