Add EventMachine::attach_server#271
Conversation
EventMachine::attach_Server is for attaching an arbitrary server IO object or file descriptor to the event loop. Tries to fix eventmachine#93. Signed-off-by: Ramon Marco L. Navarro <[email protected]>
|
What are the chances of this getting in 1.0? I'm working on v2 of Thin and relying on this: https://github.com/macournoyer/thin/blob/v2/lib/thin/server.rb#L182. Also it seems to me this would allow moving all of the socket creation code to Ruby. Thus making implementing IPv6 support and such trivial. |
|
This would be a really cool enhacement to EventMachine. Hopefully EM developers could accept this pull request. |
|
One question: would EventMachine::attach_server also allow adding a Ruby Socket (i.e. TCPSocket or OpenSSL::Socket) for acting as a connection client? this is, for establishing a connection with another server, rather than accepting incoming connections? If not, would it be very difficult to add a EventMachine::attach_client? :) |
|
There's already a method for that: EM.attach. On Wed, Feb 22, 2012 at 1:14 PM, Iaki Baz Castillo <
|
|
Sorry, you are right. Let me just a question: Should it already be possible to use OpenSSL::Socket within EM via EM.attach and establish a SSL connection from EM to an external server? |
|
I believe it should work. Should work w/ any kind of socket... But there's already support for SSL built inside EM, check the start_tls On Wed, Feb 22, 2012 at 2:48 PM, Iaki Baz Castillo <
|
|
Yes, but I don't want to use EM's SSL, it leaks, there is an open issue showing it. |
|
Hi, this pull request (along with others) has been included in EventMachine-LE: https://github.com/ibc/EventMachine-LE |
|
What's the state of this? I'm trying to run Goliath servers with stripe's einhorn and thus would need sth. like this. |
|
I think it's safe to close this now that #465 has been merged. |
There was a problem hiding this comment.
EventMachine::attach_Server is for attaching an arbitrary server IO
object or file descriptor to the event loop.
Tries to fix #93.
Signed-off-by: Ramon Marco L. Navarro [email protected]