In order to reconnect safely you need to get out of your loop
after the session has been closed AND after OnRequestDone
has been triggered RqType smtpQuit as well. You must assign event
OnSessionClose to always get notified about connection close,
this can happen before as well as after
Arno,
I think you addressed the problem correctly ;) All subsequent Connect() calls
(except the first one) are located within the OnRequestDone event procedure, in
case of RqType=smtpQuit. I now see this must be wrong.
For a safe reconnect, should the message below be posted from
Kochendoerfer, Michael wrote:
Arno,
I think you addressed the problem correctly ;) All subsequent
Connect() calls (except the first one) are located within the
OnRequestDone event procedure, in case of RqType=smtpQuit. I now see
this must be wrong.
For a safe reconnect, should the
Regarding my last mail ('SMTP component not ready' exception), I learnt that
the problem doesn't occur if I put the whole 'case RqType of: .. end;' into a
try..except and simply ignore the exception.
But I'm not sure if this is the correct way to handle it. I fear to miss some
real exceptions
Kochendoerfer, Michael wrote:
Arno,
now I implemented it all the way you suggested. I have a message
handler procedure, which decides whether a record results in a mail
or in a print job. It then calls either smtpCli.Connect() or
DoPrint() (own form method) accordingly.
When it is a
Hello Wilfried,
I'm not sure if I have understood you. I'm using one thread
to do everything, and I'm calling Pause in OnClientDataAvailabe()
on the client socket spawned by the server socket. Could you
please explain a bit more?
--
Best regards,
Jack
Tuesday, January 16, 2007, 6:48:06 AM, you
Arno,
thanks for both hints. I tried the second one first, because I don't
like much to change component source code if avoidable, due to
maintenance issues with following updates. It seems to work perfectly
good, and after several tests, I couldn't get a message posted from
OnSessionClosed,
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Wilfried Mestdagh
Sent: 13 January 2007 17:07
To: twsocket@elists.org
Subject: Re: [twsocket] WinSock error 10035 with TWSocketServer
Hello Bevan,
I'm not a CBuilder specialis but:
Hi Dan,
TWSocketClient* Client = dynamic_castTWSocketClient*(Sender);
AnsiString msg = Client-ReceiveStr();
The first line will execute, I think the second line will generate an
exception here. I´m not sure. Did you have it into an exception block ?
As far as I know the
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: 17 January 2007 22:12
To: twsocket@elists.org
Subject: Re: [twsocket] WinSock error 10035 with TWSocketServer
Hi Dan,
TWSocketClient* Client =
10 matches
Mail list logo