reuire 'socket' modules?

D

di vi

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.
 
R

Robert Klemme

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.

http://www.ruby-doc.org/

Especially http://www.ruby-doc.org/docs/ProgrammingRuby/

Kind regards

robert
 
D

di vi

Robert said:
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
 
R

Roger Pack

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,417
Latest member
DarrenGaun

Latest Threads

Top