tarcieri/celluloid-io — pull request #10 by bernd (2012-03-01 22:47:02+00:00)
Title: Add wrap_socket method to the TCPSocket class.

This feature would be nice to have to be able to handle stuff like ssl sockets. Not sure if you like the name and how it works.

```ruby
class Test
include Celluloid::IO

def initialize(host, port)
@socket = ::Celluloid::IO::TCPSocket.new(host, port)
end

def start_ssl(ssl_context)
@socket.wrap_socket do |socket|
OpenSSL::SSL::SSLSocket.new(socket, ssl_context).tap do |s|
s.sync_close = true
s.connect
end
end
end
```