In windows platform, you must use
#gem install eventmachine --pre
Then `eventmachine (1.0.0.beta.4.1 x86-mingw32)` installed
Following does not work
#gem install eventmachine
Who knows why?
| It's simple, add https gem sources: | |
| # gem sources -a https://rubygems.org/ | |
| # Following comments on eventmachine.rb - V1.0.0-beta4.1 | |
| # at line:502 | |
| def self.start_server server, port=nil, handler=nil, *args, &block | |
| begin | |
| port = Integer(port) | |
| rescue ArgumentError, TypeError | |
| # there was no port, so server must be a unix domain socket | |
| # the port argument is actually the handler, and the handler is one of the args | |
| args.unshift handler if handler |
| #definition | |
| class Object < BasicObject | |
| include Kernel | |
| ... | |
| end | |
| #examples | |
| module M; end | |
| class C; include M; end | |
| C.ancestors # => [M, Object, Kernel, BasicObject] |
http://www.openssl.org/source/openssl-0.9.8l.tar.gz
Copy the openssl tarball into the `c:\mingw` directory
#cd mingw
#tar zxf openssl-0.9.8l.tar.gz
#cd mingw/openssl-0.9.8l
Cool.io gem is the new release of Rev gem which is a ruby impelmentation of Libev, but not support Windows.
Cool.io performance is slow than EventMachine, cause of more functionality are implemented by ruby than in C.
I guess EventMachine is the best event-loop implementation in RUBY enviroment.
I remembered that I cannot compile it successfully before. But after I compiled the LibUV, and added the header file & libs, I can build libev successfully.
| ------------ | |
| 1. IPV6 patch | |
| ------------ | |
| Add following definition code in win/winsock.h | |
| // | |
| // Options to use with [gs]etsockopt at the IPPROTO_IPV6 level. | |
| // These are specified in RFCs 3493 and 3542. | |
| // The values should be consistent with the IPv6 equivalents. |