I've been having issues using Ruby, select, and the OpenSSL library. I've heard from a few people "use threads! Ruby breaks select because threads rock!" I'm not going to use Ruby's threads, because they're not real and I don't like them. So, neener. I can implement simple TLS clients/servers (ie, proof of concepts) just fine, but when I try to turn a plaintext XMPP stream into a TLS stream I get errors. I'm implementing an XMPP server in Ruby (or rather, trying to). XMPP (aka Jabber) starts out plain text, and if the ability to do TLS is advertised switches to that. Using the exact same code that works in simple proof-of-concepts, I repeatedly get "no shared cipher" from the server's side, and "wrong version number" from the client's side. Due to the complete and utter lack of documentation excluding test/openssl/ in the Ruby source, I have no idea what these errors mean or how to go about fixing them. I've tried dozens of things, including moving methods around, using an unbuffered socket to make sure some weird stuff wasn't happening, using external clients, using Ruby clients, etc. I've been at this for nearly a week, and I've consulted with a dozen people/websites/mailing lists/etc before coming to the general Ruby community. This is a blocker. If I can't resolve this, my project cannot be implemented in Ruby. If it's some stupid side effect of using a main select loop instead of threads, then I'll have to find a language that correctly implements this. Any help would be appreciated. I'm completely stuck.