# Socket patch

**URL:** <https://www.ruby-forum.com/t/socket-patch/134678>\
**Category:** IronRuby\
**Created:** [April 13, 2008, 10:28pm UTC](https://www.ruby-forum.com/t/socket-patch/134678 "2008-04-13T22:28:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![editkid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/977dab/32.png) [@editkid](https://www.ruby-forum.com/u/editkid)\
**Post date:** [April 13, 2008, 10:28pm UTC](https://www.ruby-forum.com/t/socket-patch/134678/1 "2008-04-13T22:28:30Z")

</div>

I have uploaded a patch to the rubyforge project site. You can see it  
at:  
[http://rubyforge.org/tracker/index.php?func=detail&aid=19494&group\_id=4359&a](http://rubyforge.org/tracker/index.php?func=detail&aid=19494&group_id=4359&a)  
tid=16800

Here is the blurb if you don’t have time to check it out.

Pete

> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >

This patch is a further development of the current Socket classes.

Source files

- The methods in the all the Socket classes, except for Socket itself,  
have  
been implemented.
- The classes have been moved into a subfolder of the IronRuby.Libraries  
project in line with other “library” classes such as Digest.
- The SocketError class has been implemented.
- Various Errno:: classes still need to be implemented since the not all  
Socket errors come back as SocketError exceptions!
- Various conversion methods have been abstracted, such as  
ConvertToPort,  
ConvertToHost and so on. These are stored in BasicSocket.cs

Testing files  
Some initial Socket RSpec files have been moved into the  
/trunk/tests/ironruby/specs/library/socket folder. Particularly the  
UDPSocket folder has some runnable tests.  
The spec\_runner.rb file has been modified to allow rake rspec and rake  
spec2  
to run these files. The general format is to use : colons to separate  
folders in order to run non-core specs. For example:

> rake rspec library:socket:udpsocket - fail  
> Will run all the specs in the  
> trunk/tests/ironruby/specs/library/socket/udpsocket folder.
