Thanks Fred, Yes, multiple users are not a problem as part of what is passed through the socket is the reference to the user. I have numerous channels that can be run, however, each with a different port assignement, by various users. Thus, it would seem I want to create a hash of
channels => sockets but how can I make that be persistent? -Janna B On Jul 5, 11:11 am, Frederick Cheung <[email protected]> wrote: > On Jul 5, 8:59 am, JannaB <[email protected]> wrote: > > > > > Usually, however, the channel info will remain the same. So I am > > wondering how I can make the socket persist from one POST/GET > > operation to the other, unless the channel has changed. > > > And my second question is, if I someone does tell me how I can make it > > persist, do I run the risk of some sort of memory leaks here with > > this? I wonder because I have a solitary TCPSocket object which would > > then be reassigned -- does the un-assigned old reference that socket > > contained go automatically out of scope and get garbage collected? > > Thanks, Janna B > > If you reassign a variable then its old contents will eventually be > garbage collected (assuming no other references to it). > You are likely to run into other problems though here: have you > thought about concurrent users using the app at the same time, or what > happens when you have multiple mongrels / passenger instances ? > > Lastly it looks like @socket is an instance variable of your > controller, since every request is served by a new controller instance > @socket will always be nil. > > Fred > > > repeatedly in my controller, naturally, --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

