Implementing socket

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
give:

  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
    IronRuby.Libraries/Extensions
    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

Terence

Terence L.:

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.

Excellent!

Unfortunately I’ve run into some roadblocks, and I’d appreciate any
advice you guys can give:

  1. Where should my source file(s) live?
  2. How do I get the ruby line “require ‘socket’” to work?

For the time being, please just make it a Built-In since we don’t have
require ‘zzz’ where zzz is a module inside of IronRuby.Libraries
working.

  1. Is “module” the correct ruby term for what the socket library is?
    (I.e is socket a ruby “module”?)

Sure, works for me :slight_smile:

Thanks,
-John

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs