Reuire 'socket' modules?

Hi,

I have a sort of minimal ruby environment.I need to get socket
programming running in it.So what are the associated files that I need
to add form the full fledged ruby folders (in windows?)

Please let me know.I did search in the lib folder but it does not have
anything named socket.

···

--
Posted via http://www.ruby-forum.com/.

I have a sort of minimal ruby environment.I need to get socket
programming running in it.So what are the associated files that I need
to add form the full fledged ruby folders (in windows?)

It depends what you want to do. Ruby has a number of high level libraries as well as plain sockets.

Please let me know.I did search in the lib folder but it does not have
anything named socket.

You probably better search the documentation.

Especially Programming Ruby: The Pragmatic Programmer's Guide

Kind regards

  robert

···

On 19.02.2010 08:25, di vi wrote:

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

Robert Klemme wrote:

I have a sort of minimal ruby environment.I need to get socket
programming running in it.So what are the associated files that I need
to add form the full fledged ruby folders (in windows?)

It depends what you want to do. Ruby has a number of high level
libraries as well as plain sockets.

I just want to know the associated socket modules (libraries,etc..)
which support running the following code:

require "socket"

i = 0
dts = TCPServer.new('localhost', 1101)
loop do
   Thread.start(dts.accept) do |s|
     print "connection established"
     while i < i+1 do
     #print(s, " is accepted\n")
     #s.write(Time.now)
     str = s.recv( 100 )
     print str
     end
     #print(s, " is gone\n")
     s.close
   end
end

···

On 19.02.2010 08:25, di vi wrote:

--
Posted via http://www.ruby-forum.com/\.

I just want to know the associated socket modules (libraries,etc..)
which support running the following code:

require "socket"

do
require 'socket'
puts $LOADED_FEATURES

···

--
Posted via http://www.ruby-forum.com/\.