EM-WebSocket 基于EventMachine的异步Ruby WebSocket服务器。 查看examples目录,或查看博客文章: 。 简单服务器示例 require 'em-websocket' EM . run { EM :: WebSocket . run ( :host => "0.0.0.0" , :port => 8080 ) do | ws | ws . onopen { | handshake | puts "WebSocket connection open" # Access properties on the EM::We