[Ironruby-core] Implementing socket

Terence Lewis lewistm at gmail.com
Sun Dec 2 04:24:08 EST 2007

Hello list,

I've been playing around with the IronRuby source for a couple of days
trying to figure out how to start an implementation of socket. Unfortunately
I've run into some roadblocks, and I'd appreciate any advice you guys can

1)  Where should my source file(s) live? Initially I created a file
Socket.cs in IronRuby.Libraries/BuiltIns, but then I noticed that all the
other files in that folder map directly to the "Built-in Classes and
Methods" chapter of the pickaxe book, whereas socket sits in the next
chapter - "Standard Library". So I had a look in the
folder, and decided to move the file in there, but I'm still not 100% sure
that's correct. Should there perhaps be a third folder here called
"StandardLibrary" or something?
2) How do I get the ruby line "require 'socket'" to work? I tried adding a
module called "socket" (a static class Socket with attribute
[RubyModule("socket")] and regenerating Initializer.Generated.cs, but when I
try and do "require 'socket'" from the interactive console, I get a
Ruby.Runtime.LoadError: "Could not load file or assembly 'socket'". This
leads me to believe that perhaps socket should be a separate dll, but I
think that must be wrong because you'd end up having a different dll for
every module in the standard library?
3) Is "module" the correct ruby term for what the socket library is? (I.e is
socket a ruby "module"?)

Thanks for your time

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071202/5876380b/attachment.html 

More information about the Ironruby-core mailing list