crystal-lang / crystal

The Crystal Programming Language
https://crystal-lang.org
Apache License 2.0
19.39k stars 1.62k forks source link

feature request: connection.cr #1198

Closed kostya closed 9 years ago

kostya commented 9 years ago

Connection class like: http://eventmachine.rubyforge.org/EventMachine/Connection.html

waj commented 9 years ago

In Ruby, eventmachine is useful to handle many network connections within the same thread. Crystal already can do that, without all the hassle of handling the connections in callbacks and state machines. So the question is, why would you want to have something like that in Crystal? Can you describe a scenario where an EventMachine's like connections is better that using linear code in separate fibers?

kostya commented 9 years ago

may be not understand something, but how can i get event when client or server disconnected? (in em it was unbind)