eventmachine 1.0.3-x86-mingw32 → 1.2.0.dev.2-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +84 -1
- data/README.md +6 -7
- data/ext/binder.cpp +10 -10
- data/ext/binder.h +5 -5
- data/ext/cmain.cpp +173 -61
- data/ext/ed.cpp +262 -127
- data/ext/ed.h +50 -30
- data/ext/em.cpp +491 -445
- data/ext/em.h +101 -36
- data/ext/eventmachine.h +67 -51
- data/ext/extconf.rb +124 -31
- data/ext/fastfilereader/extconf.rb +9 -2
- data/ext/fastfilereader/mapper.cpp +3 -1
- data/ext/fastfilereader/rubymain.cpp +7 -7
- data/ext/kb.cpp +1 -1
- data/ext/pipe.cpp +11 -4
- data/ext/project.h +26 -6
- data/ext/rubymain.cpp +408 -201
- data/ext/ssl.cpp +167 -20
- data/ext/ssl.h +11 -2
- data/java/src/com/rubyeventmachine/EmReactor.java +16 -0
- data/java/src/com/rubyeventmachine/EventableChannel.java +2 -0
- data/java/src/com/rubyeventmachine/EventableDatagramChannel.java +6 -0
- data/java/src/com/rubyeventmachine/EventableSocketChannel.java +55 -10
- data/lib/1.9/fastfilereaderext.so +0 -0
- data/lib/1.9/rubyeventmachine.so +0 -0
- data/lib/2.0/fastfilereaderext.so +0 -0
- data/lib/2.0/rubyeventmachine.so +0 -0
- data/lib/2.1/fastfilereaderext.so +0 -0
- data/lib/2.1/rubyeventmachine.so +0 -0
- data/lib/2.2/fastfilereaderext.so +0 -0
- data/lib/2.2/rubyeventmachine.so +0 -0
- data/lib/2.3/fastfilereaderext.so +0 -0
- data/lib/2.3/rubyeventmachine.so +0 -0
- data/lib/em/buftok.rb +34 -85
- data/lib/em/channel.rb +5 -0
- data/lib/em/completion.rb +2 -2
- data/lib/em/connection.rb +62 -4
- data/lib/em/iterator.rb +30 -48
- data/lib/em/pool.rb +1 -1
- data/lib/em/protocols/httpclient.rb +31 -11
- data/lib/em/protocols/line_and_text.rb +4 -4
- data/lib/em/protocols/linetext2.rb +44 -39
- data/lib/em/protocols/smtpclient.rb +60 -31
- data/lib/em/protocols/smtpserver.rb +32 -9
- data/lib/em/pure_ruby.rb +8 -3
- data/lib/em/queue.rb +16 -7
- data/lib/em/resolver.rb +64 -24
- data/lib/em/threaded_resource.rb +2 -2
- data/lib/em/tick_loop.rb +19 -19
- data/lib/em/version.rb +1 -1
- data/lib/eventmachine.rb +96 -49
- data/lib/jeventmachine.rb +17 -0
- data/rakelib/package.rake +31 -4
- data/tests/dhparam.pem +13 -0
- data/tests/em_test_helper.rb +87 -0
- data/tests/test_attach.rb +25 -0
- data/tests/test_basic.rb +27 -38
- data/tests/test_channel.rb +14 -1
- data/tests/test_completion.rb +1 -0
- data/tests/test_connection_count.rb +22 -1
- data/tests/test_connection_write.rb +35 -0
- data/tests/test_defer.rb +17 -0
- data/tests/test_epoll.rb +26 -14
- data/tests/test_file_watch.rb +1 -0
- data/tests/test_fork.rb +75 -0
- data/tests/test_httpclient.rb +43 -0
- data/tests/test_idle_connection.rb +6 -4
- data/tests/test_ipv4.rb +125 -0
- data/tests/test_ipv6.rb +131 -0
- data/tests/test_iterator.rb +115 -0
- data/tests/test_kb.rb +19 -25
- data/tests/test_ltp2.rb +20 -0
- data/tests/test_many_fds.rb +22 -0
- data/tests/test_pause.rb +29 -0
- data/tests/test_pool.rb +2 -0
- data/tests/test_process_watch.rb +2 -0
- data/tests/test_processes.rb +7 -7
- data/tests/test_queue.rb +14 -0
- data/tests/test_resolver.rb +56 -7
- data/tests/test_set_sock_opt.rb +2 -0
- data/tests/test_smtpclient.rb +20 -0
- data/tests/test_ssl_args.rb +2 -2
- data/tests/test_ssl_dhparam.rb +83 -0
- data/tests/test_ssl_ecdh_curve.rb +79 -0
- data/tests/test_ssl_extensions.rb +49 -0
- data/tests/test_ssl_methods.rb +22 -5
- data/tests/test_ssl_protocols.rb +246 -0
- data/tests/test_ssl_verify.rb +103 -59
- data/tests/test_system.rb +4 -0
- data/tests/test_threaded_resource.rb +8 -0
- data/tests/test_unbind_reason.rb +5 -1
- metadata +173 -107
- data/.gitignore +0 -21
- data/.travis.yml +0 -12
- data/.yardopts +0 -7
- data/Gemfile +0 -2
- data/Rakefile +0 -20
- data/eventmachine.gemspec +0 -36
- data/rakelib/cpp.rake_example +0 -77
data/.gitignore
DELETED
data/.travis.yml
DELETED
data/.yardopts
DELETED
data/Gemfile
DELETED
data/Rakefile
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
GEMSPEC = Gem::Specification.load('eventmachine.gemspec')
|
3
|
-
|
4
|
-
require 'rake/clean'
|
5
|
-
task :clobber => :clean
|
6
|
-
|
7
|
-
desc "Build eventmachine, then run tests."
|
8
|
-
task :default => [:compile, :test]
|
9
|
-
|
10
|
-
desc 'Generate documentation'
|
11
|
-
begin
|
12
|
-
require 'yard'
|
13
|
-
YARD::Rake::YardocTask.new do |t|
|
14
|
-
t.files = ['lib/**/*.rb', '-', 'docs/*.md']
|
15
|
-
t.options = ['--main', 'README.md', '--no-private']
|
16
|
-
t.options = ['--exclude', 'lib/jeventmachine', '--exclude', 'lib/pr_eventmachine']
|
17
|
-
end
|
18
|
-
rescue LoadError
|
19
|
-
task :yard do puts "Please install yard first!"; end
|
20
|
-
end
|
data/eventmachine.gemspec
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
$:.unshift File.expand_path("../lib", __FILE__)
|
3
|
-
require "em/version"
|
4
|
-
|
5
|
-
|
6
|
-
Gem::Specification.new do |s|
|
7
|
-
s.name = 'eventmachine'
|
8
|
-
s.version = EventMachine::VERSION
|
9
|
-
s.homepage = 'http://rubyeventmachine.com'
|
10
|
-
s.rubyforge_project = 'eventmachine'
|
11
|
-
|
12
|
-
s.authors = ["Francis Cianfrocca", "Aman Gupta"]
|
13
|
-
s.email = ["garbagecat10@gmail.com", "aman@tmm1.net"]
|
14
|
-
|
15
|
-
s.files = `git ls-files`.split("\n")
|
16
|
-
s.extensions = ["ext/extconf.rb", "ext/fastfilereader/extconf.rb"]
|
17
|
-
|
18
|
-
s.add_development_dependency 'rake-compiler', '~> 0.8.3'
|
19
|
-
s.add_development_dependency 'yard', ">= 0.8.5.2"
|
20
|
-
s.add_development_dependency 'bluecloth' unless RUBY_PLATFORM =~ /java/
|
21
|
-
|
22
|
-
s.summary = 'Ruby/EventMachine library'
|
23
|
-
s.description = "EventMachine implements a fast, single-threaded engine for arbitrary network
|
24
|
-
communications. It's extremely easy to use in Ruby. EventMachine wraps all
|
25
|
-
interactions with IP sockets, allowing programs to concentrate on the
|
26
|
-
implementation of network protocols. It can be used to create both network
|
27
|
-
servers and clients. To create a server or client, a Ruby program only needs
|
28
|
-
to specify the IP address and port, and provide a Module that implements the
|
29
|
-
communications protocol. Implementations of several standard network protocols
|
30
|
-
are provided with the package, primarily to serve as examples. The real goal
|
31
|
-
of EventMachine is to enable programs to easily interface with other programs
|
32
|
-
using TCP/IP, especially if custom protocols are required."
|
33
|
-
|
34
|
-
s.rdoc_options = ["--title", "EventMachine", "--main", "README.md", "-x", "lib/em/version", "-x", "lib/jeventmachine"]
|
35
|
-
s.extra_rdoc_files = ["README.md"] + `git ls-files -- docs/*`.split("\n")
|
36
|
-
end
|
data/rakelib/cpp.rake_example
DELETED
@@ -1,77 +0,0 @@
|
|
1
|
-
# EventMachine C++ Rakefile Stab Case
|
2
|
-
# TODO : track header files as a build dependency...
|
3
|
-
# TODO : cross platform support
|
4
|
-
# TODO : configure style functionality
|
5
|
-
namespace :cpp do
|
6
|
-
|
7
|
-
require 'rake/clean'
|
8
|
-
|
9
|
-
# *nix only atm...
|
10
|
-
module Cpp
|
11
|
-
class <<self
|
12
|
-
def cpp; "g++"; end
|
13
|
-
def archive; "ar"; end
|
14
|
-
def compile file, output, includes=nil, flags=nil
|
15
|
-
sh %{#{cpp} #{file} #{includes} #{flags} -c -o #{output}}
|
16
|
-
end
|
17
|
-
def link file, output, libs=nil, flags=nil
|
18
|
-
sh %{#{cpp} #{file} #{libs} #{flags} -o #{output}}
|
19
|
-
end
|
20
|
-
def static output, files
|
21
|
-
sh %{#{archive} cr #{output} #{files}}
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
module EmConfig
|
27
|
-
Path = ENV['EVENTMACHINE_SOURCE'] || 'ext'
|
28
|
-
Sources = FileList["#{Path}/*.cpp"]
|
29
|
-
Sources.delete_if { |s| /ruby/ =~ s }
|
30
|
-
Compiled = Sources.sub(%r{^#{Path}/(.*)\.cpp}, "#{Path}/\\1.o")
|
31
|
-
|
32
|
-
Flags = "-O2 -pipe -fno-common -DOS_UNIX -DWITHOUT_SSL"
|
33
|
-
Includes = ""
|
34
|
-
Libs = ''
|
35
|
-
end
|
36
|
-
CLEAN.include(EmConfig::Compiled)
|
37
|
-
|
38
|
-
rule %r{^#{EmConfig::Path}/.*\.o$} => [proc { |targ|
|
39
|
-
targ.sub(%r{^#{EmConfig::Path}/(.*)\.o$}, "#{EmConfig::Path}/\\1.cpp")
|
40
|
-
}] do |t|
|
41
|
-
Cpp.compile t.source, t.name, EmConfig::Includes, EmConfig::Flags
|
42
|
-
end
|
43
|
-
|
44
|
-
file "#{EmConfig::Path}/libeventmachine.a" => EmConfig::Compiled do |t|
|
45
|
-
Cpp.static t.name, EmConfig::Compiled
|
46
|
-
end
|
47
|
-
CLEAN.include("#{EmConfig::Path}/libeventmachine.a")
|
48
|
-
|
49
|
-
module AppConfig
|
50
|
-
Appname = 'echo_em'
|
51
|
-
Sources = FileList['*.cpp']
|
52
|
-
Compiled = Sources.sub(%r{^(.*)\.cpp}, '\\1.o')
|
53
|
-
|
54
|
-
Flags = ["", EmConfig::Flags].join(' ')
|
55
|
-
Includes = ["-I. -I#{EmConfig::Path}", EmConfig::Includes].join(' ')
|
56
|
-
Libs = ["-L#{EmConfig::Path} -leventmachine", EmConfig::Libs].join(' ')
|
57
|
-
end
|
58
|
-
CLEAN.include(AppConfig::Compiled)
|
59
|
-
CLEAN.include(AppConfig::Appname)
|
60
|
-
|
61
|
-
rule %r{^.*\.o$} => [proc { |targ|
|
62
|
-
targ.sub(%r{^(.*)\.o$}, '\\1.cpp')
|
63
|
-
}] do |t|
|
64
|
-
Cpp.compile t.source, t.name, AppConfig::Includes, AppConfig::Flags
|
65
|
-
end
|
66
|
-
|
67
|
-
file AppConfig::Appname => ["#{EmConfig::Path}/libeventmachine.a", AppConfig::Compiled] do |t|
|
68
|
-
Cpp.link AppConfig::Compiled, t.name, AppConfig::Libs, AppConfig::Flags
|
69
|
-
end
|
70
|
-
|
71
|
-
task :build => AppConfig::Appname
|
72
|
-
|
73
|
-
task :run => AppConfig::Appname do
|
74
|
-
sh "./#{AppConfig::Appname}"
|
75
|
-
end
|
76
|
-
|
77
|
-
end
|