# Implementing socket

**URL:** <https://www.ruby-forum.com/t/implementing-socket/121877>\
**Category:** IronRuby\
**Created:** [December 2, 2007, 10:42am UTC](https://www.ruby-forum.com/t/implementing-socket/121877 "2007-12-02T10:42:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Terence\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@Terence\_L](https://www.ruby-forum.com/u/Terence_L)\
**Post date:** [December 2, 2007, 10:42am UTC](https://www.ruby-forum.com/t/implementing-socket/121877/1 "2007-12-02T10:42:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Terence\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@Terence\_L](https://www.ruby-forum.com/u/Terence_L)\
**Post date:** [December 2, 2007, 5:26pm UTC](https://www.ruby-forum.com/t/implementing-socket/121877/2 "2007-12-02T17:26:29Z")

</div>

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 🙂

Thanks,  
-John
