[twsocket] Correct shutdown/abort procedure

2010-05-13 Thread Pete Williams

Hi all

I use  TsmtpCli and TPop3Cli, and am not shutting these down correctly, and 
would like some advice on how to stop these components.

Here's the problem.

These components work reliably on a thread where there are many other such 
components, reading and writing user email. Each account on our system gets one 
of each.

At any point, an account may be requested to stop.

What is the correct way to say to these 2 components 'stop whatever you are 
doing, clean up and quit'?

The thread that the components exist in continues to run.

The problem I have is that sometimes after they've stopped, I get GPFs in the 
message pump that these used to exist in - sometimes immediately, sometimes 
after a delay of several minutes. 

Thanks in advance
  
_
http://clk.atdmt.com/UKM/go/19780/direct/01/
Do you have a story that started on Hotmail? Tell us now
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] BTW: Support for OpenSSL 0.9.8n is available (ICS v7)

2010-05-13 Thread Zvone
 Most likely that's wrong, as I recall the vulnerability,
 it's probably only safe to not enable option
 SslOpt_ALLOW_UNSAFE_LEGACY_RENEGOTIATION.

I never even meant to enable this option. If it fails I don't care.
Many servers will be upgraded quickly to fix this issue anyway so I don't
think enabling this option will make a huge difference anyway.

By the way, can anyone approve me so I can write documentation on wiki? I'm
really tired of looking for documentation on like... 20 different places and
many things are undocumented. Even a lousy documentation is better than
nothing.

As I use components I will update wiki (and not for altruistic reasons - for
myself so I have it in one place :) and provide examples in c++ (someone may
later rewrite them in delphi, I don't care about it).

I have a suggestion - why are you so strict about approval of people that
write content? Subscribing to the wiki should be enough, not just another
approval. We have too much of usernames for other web places anyway!

Have in mind that these strict rules and using mailing list instead of
forums discourages a lot of people from using ICS - wikipedia is open for
anyone to edit and if works just fine and if you're afraid of spam - well,
that's unavoidable, live with it, but that's why you can lock out registered
user to wiki and return content to previous wiki version if spam appears.
But I don't think there will be a lot of spam anyway, wiki needs signed up
user anyway that is more than enough and the majority of users are
programmers not spammers, they are not likely to be interested in this.

I am willing to write content but discouraged by these strict rules myself
so I speak from my personal perspective. With current policies, the
documentation will never be updated and it is one of the most boring jobs in
the world so nobody will be motivated unless a few people from here and
there do it.
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Correct shutdown/abort procedure

2010-05-13 Thread Arno Garrels
Pete Williams wrote:

 At any point, an account may be requested to stop.
 
 What is the correct way to say to these 2 components 'stop whatever
 you are doing, clean up and quit'?
 
 The thread that the components exist in continues to run.
 
 The problem I have is that sometimes after they've stopped, I get
 GPFs in the message pump that these used to exist in - sometimes
 immediately, sometimes after a delay of several minutes.  

In order to abort and stop them as fast as possible call Abort.
Abort most likely will trigger other events, setting all event handlers
to nil prevents this. Since an instance may not be freed from its own
event handlers one has to PostThreadMessage() a custom message, and
free the object when this message is handled. The thread requires a 
custom message pump.

--
Arno Garrels


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


[twsocket] Wiki (was BTW: Support for OpenSSL 0.9.8n is available (ICS v7))

2010-05-13 Thread Arno Garrels
Zvone wrote:

 By the way, can anyone approve me so I can write documentation on
 wiki? I'm really tired of looking for documentation on like... 20
 different places and many things are undocumented. Even a lousy
 documentation is better than nothing.

Only Francois can, just send him a short PM.

 
 As I use components I will update wiki (and not for altruistic
 reasons - for myself so I have it in one place :) and provide
 examples in c++ (someone may later rewrite them in delphi, I don't
 care about it). 
 
 I have a suggestion - why are you so strict about approval of people
 that write content? 

Probably because it's safer against SPAM and other unwanted content?

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


Re: [twsocket] Correct shutdown/abort procedure

2010-05-13 Thread Pete Williams

Thanks for the tip Arno.

I was calling abort, but then going on to free the components after the Abort.

I'll add a delay, and a custom message as you advise.

Pete

 From: arno.garr...@gmx.de
 To: twsocket@elists.org
 Date: Thu, 13 May 2010 15:12:20 +0200
 Subject: Re: [twsocket] Correct shutdown/abort procedure
 
 Pete Williams wrote:
 
  At any point, an account may be requested to stop.
  
  What is the correct way to say to these 2 components 'stop whatever
  you are doing, clean up and quit'?
  
  The thread that the components exist in continues to run.
  
  The problem I have is that sometimes after they've stopped, I get
  GPFs in the message pump that these used to exist in - sometimes
  immediately, sometimes after a delay of several minutes.  
 
 In order to abort and stop them as fast as possible call Abort.
 Abort most likely will trigger other events, setting all event handlers
 to nil prevents this. Since an instance may not be freed from its own
 event handlers one has to PostThreadMessage() a custom message, and
 free the object when this message is handled. The thread requires a 
 custom message pump.
 
 --
 Arno Garrels
 
 
 --
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be
  
_
http://clk.atdmt.com/UKM/go/19780/direct/01/
We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Wiki (was BTW: Support for OpenSSL 0.9.8n isavailable(ICS v7))

2010-05-13 Thread Arno Garrels
Zvone wrote:

 - I already wrote to Francois and got no reply (I know I can remind him
 again, but how encouraging is that?)

That's very strange, your mail must got lost, since wiki-writers are always
very welcome.

 I have a suggestion - why are you so strict about approval of people
 that write content?
 
 Probably because it's safer against SPAM and other unwanted content?
 
 Here are thoughts for you:

I agree with you, provided the automated subscription procedure was 
spam-safe (against robots), it's possible to revert back to previous 
content easily and we got one or two wiki-sheriffs. 
However that's not mine but Francois' decision.
  
--
Arno Garrels


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


[twsocket] Wiki

2010-05-13 Thread Markus Humm
Hello,

somebody wrote ablout the wiki and free access to it.
If one looks at the huge number of loginns already created
for the Wiki and how few of them actually contributed already
it's doubtfull that completely free access will change much
if anything.

Greetings

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