Ruby has a Thread class.
t = Thread.new do
  ...
end

Depending on whether you want to act as a socket server you can make
use of ruby's TCPServer, or if you want to connect to a (socket)
server there's the TCPSocket class.

What exactly do you want to do, what is your use case? Why do you need
(long-living?) threads (per session or, even worse, "click"?)?
Maybe BJ (http://codeforpeople.rubyforge.org/svn/bj/trunk/README) or
delayed_job (http://github.com/tobi/delayed_job) suffice?

Hope this helps

On 3 Dez., 07:56, Paulo Coutinho <pa...@prsolucoes.com> wrote:
> Hi,
>
> How to make a socket to listen a port and make it multi-thread (one thread
> per client connection) with JRUBY ?
>
> Anyone have examples or can give me a code?
>
> --
> Atenciosamente,
> Paulo Coutinho.
> Blog:www.prsolucoes.com/blog
> Site:www.prsolucoes.com
> Msn:  pa...@prsolucoes.com

--

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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


Reply via email to