[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Eventmachine parameters to post_init

Leslie Viljoen

6/20/2008 7:14:00 AM

Hi!

I have a module which EventMachine mixes in to implement a UDP server.
In this case the module's post_init method is called when someone
connects and takes the place of a constructor, but how can I pass
parameters to post_init?

I have a configuration object that I want to share among all of my
server instances, how do I accomplish that without making a global
variable?

Les

1 Answer

Leslie Viljoen

6/20/2008 7:17:00 AM

0

On 6/20/08, Leslie Viljoen <leslieviljoen@gmail.com> wrote:
> Hi!
>
> I have a module which EventMachine mixes in to implement a UDP server.
> In this case the module's post_init method is called when someone
> connects and takes the place of a constructor, but how can I pass
> parameters to post_init?
>
> I have a configuration object that I want to share among all of my
> server instances, how do I accomplish that without making a global
> variable?

Nevermind, I see you can get EventMachine to make use of a class
instead of a Module for new server instances. I'll use that facility.

Les