Re: How to keep persistent socket connections?

Pardee, Roy
Thu, 21 May 2009 18:49:46 -0000

If I was you I''d ask how to do this over on comp.lang.ruby.  My guess
is you''ll have a better time doing this entirely outside of rails.

BTW--the first appendix of the pickaxe book covers ruby''s socket
library.  If you haven''t already looked at that, there could be some
useful stuff in there...

-----Original Message-----
From: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
[mailto:rubyonrails-talk@googlegroups.com] On Behalf Of Steve Hull
Sent: Thursday, May 21, 2009 11:41 AM
To: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: [Rails] Re: How to keep persistent socket connections?


> Today I''m going to try opening the socket and then storing the
socket
> in the Rails cache, in order to see if that socket remains open and
> useable even while just sitting in the cache (I''m kind of thinking
it
> won''t).

Yeah, that didn''t work because caching the connection makes it
immutable, which means you can no longer write data to it.  But you know what I
think *will* work?  Storing the connection(s) as class vars.  So I''m
trying that next.  I will report back here afterward for anyone who might be
interested.
--
Posted via http://www.ruby-forum.com/.



GHC Confidentiality Statement

This message and any attached files might contain confidential information
protected by federal and state law. The information is intended only for the use
of the individual(s) or entities originally named as addressees. The improper
disclosure of such information may be subject to civil or criminal penalties. If
this message reached you in error, please contact the sender and destroy this
message. Disclosing, copying, forwarding, or distributing the information by
unauthorized individuals or entities is strictly prohibited by law.