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.
Files changed (101) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +84 -1
  3. data/README.md +6 -7
  4. data/ext/binder.cpp +10 -10
  5. data/ext/binder.h +5 -5
  6. data/ext/cmain.cpp +173 -61
  7. data/ext/ed.cpp +262 -127
  8. data/ext/ed.h +50 -30
  9. data/ext/em.cpp +491 -445
  10. data/ext/em.h +101 -36
  11. data/ext/eventmachine.h +67 -51
  12. data/ext/extconf.rb +124 -31
  13. data/ext/fastfilereader/extconf.rb +9 -2
  14. data/ext/fastfilereader/mapper.cpp +3 -1
  15. data/ext/fastfilereader/rubymain.cpp +7 -7
  16. data/ext/kb.cpp +1 -1
  17. data/ext/pipe.cpp +11 -4
  18. data/ext/project.h +26 -6
  19. data/ext/rubymain.cpp +408 -201
  20. data/ext/ssl.cpp +167 -20
  21. data/ext/ssl.h +11 -2
  22. data/java/src/com/rubyeventmachine/EmReactor.java +16 -0
  23. data/java/src/com/rubyeventmachine/EventableChannel.java +2 -0
  24. data/java/src/com/rubyeventmachine/EventableDatagramChannel.java +6 -0
  25. data/java/src/com/rubyeventmachine/EventableSocketChannel.java +55 -10
  26. data/lib/1.9/fastfilereaderext.so +0 -0
  27. data/lib/1.9/rubyeventmachine.so +0 -0
  28. data/lib/2.0/fastfilereaderext.so +0 -0
  29. data/lib/2.0/rubyeventmachine.so +0 -0
  30. data/lib/2.1/fastfilereaderext.so +0 -0
  31. data/lib/2.1/rubyeventmachine.so +0 -0
  32. data/lib/2.2/fastfilereaderext.so +0 -0
  33. data/lib/2.2/rubyeventmachine.so +0 -0
  34. data/lib/2.3/fastfilereaderext.so +0 -0
  35. data/lib/2.3/rubyeventmachine.so +0 -0
  36. data/lib/em/buftok.rb +34 -85
  37. data/lib/em/channel.rb +5 -0
  38. data/lib/em/completion.rb +2 -2
  39. data/lib/em/connection.rb +62 -4
  40. data/lib/em/iterator.rb +30 -48
  41. data/lib/em/pool.rb +1 -1
  42. data/lib/em/protocols/httpclient.rb +31 -11
  43. data/lib/em/protocols/line_and_text.rb +4 -4
  44. data/lib/em/protocols/linetext2.rb +44 -39
  45. data/lib/em/protocols/smtpclient.rb +60 -31
  46. data/lib/em/protocols/smtpserver.rb +32 -9
  47. data/lib/em/pure_ruby.rb +8 -3
  48. data/lib/em/queue.rb +16 -7
  49. data/lib/em/resolver.rb +64 -24
  50. data/lib/em/threaded_resource.rb +2 -2
  51. data/lib/em/tick_loop.rb +19 -19
  52. data/lib/em/version.rb +1 -1
  53. data/lib/eventmachine.rb +96 -49
  54. data/lib/jeventmachine.rb +17 -0
  55. data/rakelib/package.rake +31 -4
  56. data/tests/dhparam.pem +13 -0
  57. data/tests/em_test_helper.rb +87 -0
  58. data/tests/test_attach.rb +25 -0
  59. data/tests/test_basic.rb +27 -38
  60. data/tests/test_channel.rb +14 -1
  61. data/tests/test_completion.rb +1 -0
  62. data/tests/test_connection_count.rb +22 -1
  63. data/tests/test_connection_write.rb +35 -0
  64. data/tests/test_defer.rb +17 -0
  65. data/tests/test_epoll.rb +26 -14
  66. data/tests/test_file_watch.rb +1 -0
  67. data/tests/test_fork.rb +75 -0
  68. data/tests/test_httpclient.rb +43 -0
  69. data/tests/test_idle_connection.rb +6 -4
  70. data/tests/test_ipv4.rb +125 -0
  71. data/tests/test_ipv6.rb +131 -0
  72. data/tests/test_iterator.rb +115 -0
  73. data/tests/test_kb.rb +19 -25
  74. data/tests/test_ltp2.rb +20 -0
  75. data/tests/test_many_fds.rb +22 -0
  76. data/tests/test_pause.rb +29 -0
  77. data/tests/test_pool.rb +2 -0
  78. data/tests/test_process_watch.rb +2 -0
  79. data/tests/test_processes.rb +7 -7
  80. data/tests/test_queue.rb +14 -0
  81. data/tests/test_resolver.rb +56 -7
  82. data/tests/test_set_sock_opt.rb +2 -0
  83. data/tests/test_smtpclient.rb +20 -0
  84. data/tests/test_ssl_args.rb +2 -2
  85. data/tests/test_ssl_dhparam.rb +83 -0
  86. data/tests/test_ssl_ecdh_curve.rb +79 -0
  87. data/tests/test_ssl_extensions.rb +49 -0
  88. data/tests/test_ssl_methods.rb +22 -5
  89. data/tests/test_ssl_protocols.rb +246 -0
  90. data/tests/test_ssl_verify.rb +103 -59
  91. data/tests/test_system.rb +4 -0
  92. data/tests/test_threaded_resource.rb +8 -0
  93. data/tests/test_unbind_reason.rb +5 -1
  94. metadata +173 -107
  95. data/.gitignore +0 -21
  96. data/.travis.yml +0 -12
  97. data/.yardopts +0 -7
  98. data/Gemfile +0 -2
  99. data/Rakefile +0 -20
  100. data/eventmachine.gemspec +0 -36
  101. data/rakelib/cpp.rake_example +0 -77
data/.gitignore DELETED
@@ -1,21 +0,0 @@
1
- pkg
2
- rdoc
3
- Makefile
4
-
5
- *.bundle
6
- *.dll
7
- *.so
8
- *.jar
9
- *.class
10
- *.o
11
- *.log
12
- *.def
13
- *.pdb
14
- *.dSYM
15
- java/src/.project
16
- *.rbc
17
- Gemfile.lock
18
-
19
- .yardoc/*
20
- doc/*
21
-
@@ -1,12 +0,0 @@
1
- script: rake compile test
2
- language: ruby
3
- rvm:
4
- - 1.8.7
5
- - 1.9.3
6
- - rbx-18mode
7
- - rbx-19mode
8
- - jruby
9
- matrix:
10
- allow_failures:
11
- - rvm: rbx-18mode
12
- - rvm: rbx-19mode
data/.yardopts DELETED
@@ -1,7 +0,0 @@
1
- --no-private
2
- --protected
3
- --markup="markdown" lib/**/*.rb
4
- --main README.md
5
- --exclude jeventmachine --exclude pure_ruby
6
- -
7
- docs/*.md
data/Gemfile DELETED
@@ -1,2 +0,0 @@
1
- source 'https://rubygems.org'
2
- gemspec
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
@@ -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
@@ -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