eventmachine 0.12.0-i386-mswin32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. data/COPYING +60 -0
  2. data/DEFERRABLES +138 -0
  3. data/EPOLL +141 -0
  4. data/GNU +281 -0
  5. data/KEYBOARD +38 -0
  6. data/LEGAL +25 -0
  7. data/LIGHTWEIGHT_CONCURRENCY +72 -0
  8. data/PURE_RUBY +77 -0
  9. data/README +74 -0
  10. data/RELEASE_NOTES +96 -0
  11. data/SMTP +9 -0
  12. data/SPAWNED_PROCESSES +93 -0
  13. data/TODO +10 -0
  14. data/ext/Makefile +180 -0
  15. data/ext/binder.cpp +126 -0
  16. data/ext/binder.h +48 -0
  17. data/ext/cmain.cpp +527 -0
  18. data/ext/cplusplus.cpp +172 -0
  19. data/ext/ed.cpp +1442 -0
  20. data/ext/ed.h +351 -0
  21. data/ext/em.cpp +1781 -0
  22. data/ext/em.h +167 -0
  23. data/ext/emwin.cpp +300 -0
  24. data/ext/emwin.h +94 -0
  25. data/ext/epoll.cpp +26 -0
  26. data/ext/epoll.h +25 -0
  27. data/ext/eventmachine.h +83 -0
  28. data/ext/eventmachine_cpp.h +94 -0
  29. data/ext/extconf.rb +203 -0
  30. data/ext/files.cpp +94 -0
  31. data/ext/files.h +65 -0
  32. data/ext/kb.cpp +368 -0
  33. data/ext/mkmf.log +129 -0
  34. data/ext/page.cpp +107 -0
  35. data/ext/page.h +51 -0
  36. data/ext/pipe.cpp +327 -0
  37. data/ext/project.h +119 -0
  38. data/ext/rubyeventmachine-i386-mswin32.def +2 -0
  39. data/ext/rubyeventmachine-i386-mswin32.exp +0 -0
  40. data/ext/rubyeventmachine-i386-mswin32.lib +0 -0
  41. data/ext/rubyeventmachine-i386-mswin32.pdb +0 -0
  42. data/ext/rubyeventmachine.so +0 -0
  43. data/ext/rubymain.cpp +630 -0
  44. data/ext/sigs.cpp +89 -0
  45. data/ext/sigs.h +32 -0
  46. data/ext/ssl.cpp +408 -0
  47. data/ext/ssl.h +86 -0
  48. data/ext/vc60.pdb +0 -0
  49. data/lib/em/deferrable.rb +208 -0
  50. data/lib/em/eventable.rb +39 -0
  51. data/lib/em/future.rb +62 -0
  52. data/lib/em/messages.rb +66 -0
  53. data/lib/em/processes.rb +68 -0
  54. data/lib/em/spawnable.rb +88 -0
  55. data/lib/em/streamer.rb +112 -0
  56. data/lib/eventmachine.rb +1621 -0
  57. data/lib/eventmachine_version.rb +31 -0
  58. data/lib/evma.rb +32 -0
  59. data/lib/evma/callback.rb +32 -0
  60. data/lib/evma/container.rb +75 -0
  61. data/lib/evma/factory.rb +77 -0
  62. data/lib/evma/protocol.rb +87 -0
  63. data/lib/evma/reactor.rb +48 -0
  64. data/lib/jeventmachine.rb +106 -0
  65. data/lib/pr_eventmachine.rb +1011 -0
  66. data/lib/protocols/buftok.rb +127 -0
  67. data/lib/protocols/header_and_content.rb +123 -0
  68. data/lib/protocols/httpcli2.rb +784 -0
  69. data/lib/protocols/httpclient.rb +253 -0
  70. data/lib/protocols/line_and_text.rb +122 -0
  71. data/lib/protocols/linetext2.rb +145 -0
  72. data/lib/protocols/saslauth.rb +179 -0
  73. data/lib/protocols/smtpclient.rb +308 -0
  74. data/lib/protocols/smtpserver.rb +543 -0
  75. data/lib/protocols/stomp.rb +127 -0
  76. data/lib/protocols/tcptest.rb +57 -0
  77. data/lib/rubyeventmachine.so +0 -0
  78. data/tests/test_basic.rb +142 -0
  79. data/tests/test_defer.rb +63 -0
  80. data/tests/test_epoll.rb +168 -0
  81. data/tests/test_errors.rb +82 -0
  82. data/tests/test_eventables.rb +78 -0
  83. data/tests/test_exc.rb +58 -0
  84. data/tests/test_futures.rb +214 -0
  85. data/tests/test_hc.rb +221 -0
  86. data/tests/test_httpclient.rb +194 -0
  87. data/tests/test_httpclient2.rb +133 -0
  88. data/tests/test_kb.rb +61 -0
  89. data/tests/test_ltp.rb +190 -0
  90. data/tests/test_ltp2.rb +261 -0
  91. data/tests/test_next_tick.rb +58 -0
  92. data/tests/test_processes.rb +56 -0
  93. data/tests/test_pure.rb +128 -0
  94. data/tests/test_running.rb +47 -0
  95. data/tests/test_sasl.rb +73 -0
  96. data/tests/test_send_file.rb +238 -0
  97. data/tests/test_servers.rb +90 -0
  98. data/tests/test_smtpclient.rb +81 -0
  99. data/tests/test_smtpserver.rb +93 -0
  100. data/tests/test_spawn.rb +329 -0
  101. data/tests/test_timers.rb +138 -0
  102. data/tests/test_ud.rb +43 -0
  103. data/tests/testem.rb +5 -0
  104. metadata +170 -0
@@ -0,0 +1,138 @@
1
+ # $Id: test_timers.rb 668 2008-01-04 23:00:34Z blackhedd $
2
+ #
3
+ # Author:: Francis Cianfrocca (gmail: blackhedd)
4
+ # Homepage:: http://rubyeventmachine.com
5
+ # Date:: 8 April 2006
6
+ #
7
+ # See EventMachine and EventMachine::Connection for documentation and
8
+ # usage examples.
9
+ #
10
+ #----------------------------------------------------------------------------
11
+ #
12
+ # Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved.
13
+ # Gmail: blackhedd
14
+ #
15
+ # This program is free software; you can redistribute it and/or modify
16
+ # it under the terms of either: 1) the GNU General Public License
17
+ # as published by the Free Software Foundation; either version 2 of the
18
+ # License, or (at your option) any later version; or 2) Ruby's License.
19
+ #
20
+ # See the file COPYING for complete licensing information.
21
+ #
22
+ #---------------------------------------------------------------------------
23
+ #
24
+ #
25
+ #
26
+ #
27
+
28
+ $:.unshift "../lib"
29
+ require 'eventmachine'
30
+ require 'test/unit'
31
+
32
+
33
+ class TestTimers < Test::Unit::TestCase
34
+
35
+ def setup
36
+ end
37
+
38
+ def teardown
39
+ end
40
+
41
+ def test_timer_with_block
42
+ x = false
43
+ EventMachine.run {
44
+ EventMachine::Timer.new(0.25) {
45
+ x = true
46
+ EventMachine.stop
47
+ }
48
+ }
49
+ assert x
50
+ end
51
+
52
+ def test_timer_with_proc
53
+ x = false
54
+ EventMachine.run {
55
+ EventMachine::Timer.new(0.25, proc {
56
+ x = true
57
+ EventMachine.stop
58
+ })
59
+ }
60
+ assert x
61
+ end
62
+
63
+ def test_timer_cancel
64
+ x = true
65
+ EventMachine.run {
66
+ timer = EventMachine::Timer.new(0.25, proc { x = false })
67
+ timer.cancel
68
+ EventMachine::Timer.new(0.5, proc {EventMachine.stop})
69
+ }
70
+ assert x
71
+ end
72
+
73
+ def test_periodic_timer
74
+ x = 0
75
+ EventMachine.run {
76
+ EventMachine::PeriodicTimer.new(0.1, proc {
77
+ x += 1
78
+ EventMachine.stop if x == 4
79
+ })
80
+ }
81
+ assert( x == 4 )
82
+ end
83
+
84
+ def test_periodic_timer_cancel
85
+ x = 0
86
+ EventMachine.run {
87
+ pt = EventMachine::PeriodicTimer.new(5, proc { x += 1 })
88
+ pt.cancel
89
+ EventMachine::Timer.new(0.5) {EventMachine.stop}
90
+ }
91
+ assert( x == 0 )
92
+ end
93
+
94
+ def test_periodic_timer_self_cancel
95
+ x = 0
96
+ EventMachine.run {
97
+ pt = EventMachine::PeriodicTimer.new(0.1) {
98
+ x += 1
99
+ if x == 4
100
+ pt.cancel
101
+ EventMachine.stop
102
+ end
103
+ }
104
+ }
105
+ assert( x == 4 )
106
+ end
107
+
108
+
109
+ # This test is only applicable to compiled versions of the reactor.
110
+ # Pure ruby versions have no built-in limit on the number of outstanding timers.
111
+ #
112
+ def test_timer_change_max_outstanding
113
+ ten_thousand_timers = proc {
114
+ 10000.times {
115
+ EM.add_timer(5) {}
116
+ }
117
+ }
118
+ EM.run {
119
+ if EM.library_type == :pure_ruby
120
+ ten_thousand_timers.call
121
+ else
122
+ assert_raise( RuntimeError ) {
123
+ ten_thousand_timers.call
124
+ }
125
+ end
126
+ EM.stop
127
+ }
128
+
129
+ EM.set_max_timers( 10001 )
130
+
131
+ EM.run {
132
+ ten_thousand_timers.call
133
+ EM.stop
134
+ }
135
+ end
136
+
137
+ end
138
+
@@ -0,0 +1,43 @@
1
+ # $Id: test_ud.rb 668 2008-01-04 23:00:34Z blackhedd $
2
+ #
3
+ # Author:: Francis Cianfrocca (gmail: blackhedd)
4
+ # Homepage:: http://rubyeventmachine.com
5
+ # Date:: 8 April 2006
6
+ #
7
+ # See EventMachine and EventMachine::Connection for documentation and
8
+ # usage examples.
9
+ #
10
+ #----------------------------------------------------------------------------
11
+ #
12
+ # Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved.
13
+ # Gmail: blackhedd
14
+ #
15
+ # This program is free software; you can redistribute it and/or modify
16
+ # it under the terms of either: 1) the GNU General Public License
17
+ # as published by the Free Software Foundation; either version 2 of the
18
+ # License, or (at your option) any later version; or 2) Ruby's License.
19
+ #
20
+ # See the file COPYING for complete licensing information.
21
+ #
22
+ #---------------------------------------------------------------------------
23
+ #
24
+ #
25
+ #
26
+
27
+ $:.unshift "../lib"
28
+ require 'eventmachine'
29
+ require 'test/unit'
30
+
31
+ class TestUserDefinedEvents < Test::Unit::TestCase
32
+
33
+ def setup
34
+ end
35
+
36
+ def teardown
37
+ end
38
+
39
+ def test_a
40
+ end
41
+
42
+ end
43
+
@@ -0,0 +1,5 @@
1
+ # $Id: testem.rb 668 2008-01-04 23:00:34Z blackhedd $
2
+ #
3
+ # STUB
4
+ #
5
+
metadata ADDED
@@ -0,0 +1,170 @@
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.9.2
3
+ specification_version: 1
4
+ name: eventmachine
5
+ version: !ruby/object:Gem::Version
6
+ version: 0.12.0
7
+ date: 2008-05-14 00:00:00 -04:00
8
+ summary: Ruby/EventMachine library
9
+ require_paths:
10
+ - lib
11
+ email: garbagecat10@gmail.com
12
+ homepage: http://rubyeventmachine.com
13
+ rubyforge_project: eventmachine
14
+ description: ""
15
+ autorequire:
16
+ default_executable:
17
+ bindir: bin
18
+ has_rdoc: true
19
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
20
+ requirements:
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
24
+ version:
25
+ platform: i386-mswin32
26
+ signing_key:
27
+ cert_chain:
28
+ post_install_message:
29
+ authors:
30
+ - Francis Cianfrocca
31
+ files:
32
+ - tests/testem.rb
33
+ - tests/test_basic.rb
34
+ - tests/test_defer.rb
35
+ - tests/test_epoll.rb
36
+ - tests/test_errors.rb
37
+ - tests/test_eventables.rb
38
+ - tests/test_exc.rb
39
+ - tests/test_futures.rb
40
+ - tests/test_hc.rb
41
+ - tests/test_httpclient.rb
42
+ - tests/test_httpclient2.rb
43
+ - tests/test_kb.rb
44
+ - tests/test_ltp.rb
45
+ - tests/test_ltp2.rb
46
+ - tests/test_next_tick.rb
47
+ - tests/test_processes.rb
48
+ - tests/test_pure.rb
49
+ - tests/test_running.rb
50
+ - tests/test_sasl.rb
51
+ - tests/test_send_file.rb
52
+ - tests/test_servers.rb
53
+ - tests/test_smtpclient.rb
54
+ - tests/test_smtpserver.rb
55
+ - tests/test_spawn.rb
56
+ - tests/test_timers.rb
57
+ - tests/test_ud.rb
58
+ - lib/em
59
+ - lib/em/deferrable.rb
60
+ - lib/em/eventable.rb
61
+ - lib/em/future.rb
62
+ - lib/em/messages.rb
63
+ - lib/em/processes.rb
64
+ - lib/em/spawnable.rb
65
+ - lib/em/streamer.rb
66
+ - lib/eventmachine.rb
67
+ - lib/eventmachine_version.rb
68
+ - lib/evma
69
+ - lib/evma/callback.rb
70
+ - lib/evma/container.rb
71
+ - lib/evma/factory.rb
72
+ - lib/evma/protocol.rb
73
+ - lib/evma/reactor.rb
74
+ - lib/evma.rb
75
+ - lib/jeventmachine.rb
76
+ - lib/protocols
77
+ - lib/protocols/buftok.rb
78
+ - lib/protocols/header_and_content.rb
79
+ - lib/protocols/httpcli2.rb
80
+ - lib/protocols/httpclient.rb
81
+ - lib/protocols/linetext2.rb
82
+ - lib/protocols/line_and_text.rb
83
+ - lib/protocols/saslauth.rb
84
+ - lib/protocols/smtpclient.rb
85
+ - lib/protocols/smtpserver.rb
86
+ - lib/protocols/stomp.rb
87
+ - lib/protocols/tcptest.rb
88
+ - lib/pr_eventmachine.rb
89
+ - ext/binder.cpp
90
+ - ext/binder.h
91
+ - ext/cmain.cpp
92
+ - ext/cplusplus.cpp
93
+ - ext/ed.cpp
94
+ - ext/ed.h
95
+ - ext/em.cpp
96
+ - ext/em.h
97
+ - ext/emwin.cpp
98
+ - ext/emwin.h
99
+ - ext/epoll.cpp
100
+ - ext/epoll.h
101
+ - ext/eventmachine.h
102
+ - ext/eventmachine_cpp.h
103
+ - ext/extconf.rb
104
+ - ext/files.cpp
105
+ - ext/files.h
106
+ - ext/kb.cpp
107
+ - ext/page.cpp
108
+ - ext/page.h
109
+ - ext/pipe.cpp
110
+ - ext/project.h
111
+ - ext/rubymain.cpp
112
+ - ext/sigs.cpp
113
+ - ext/sigs.h
114
+ - ext/ssl.cpp
115
+ - ext/ssl.h
116
+ - README
117
+ - RELEASE_NOTES
118
+ - COPYING
119
+ - EPOLL
120
+ - GNU
121
+ - LEGAL
122
+ - TODO
123
+ - KEYBOARD
124
+ - LIGHTWEIGHT_CONCURRENCY
125
+ - PURE_RUBY
126
+ - SMTP
127
+ - SPAWNED_PROCESSES
128
+ - DEFERRABLES
129
+ - tests
130
+ - lib
131
+ - lib/rubyeventmachine.so
132
+ - ext
133
+ - ext/vc60.pdb
134
+ - ext/rubyeventmachine.so
135
+ - ext/rubyeventmachine-i386-mswin32.pdb
136
+ - ext/rubyeventmachine-i386-mswin32.lib
137
+ - ext/rubyeventmachine-i386-mswin32.exp
138
+ - ext/rubyeventmachine-i386-mswin32.def
139
+ - ext/mkmf.log
140
+ - ext/Makefile
141
+ test_files:
142
+ - tests/testem.rb
143
+ rdoc_options:
144
+ - --title
145
+ - EventMachine
146
+ - --main
147
+ - README
148
+ - --line-numbers
149
+ extra_rdoc_files:
150
+ - README
151
+ - RELEASE_NOTES
152
+ - COPYING
153
+ - EPOLL
154
+ - GNU
155
+ - LEGAL
156
+ - TODO
157
+ - KEYBOARD
158
+ - LIGHTWEIGHT_CONCURRENCY
159
+ - PURE_RUBY
160
+ - SMTP
161
+ - SPAWNED_PROCESSES
162
+ - DEFERRABLES
163
+ executables: []
164
+
165
+ extensions: []
166
+
167
+ requirements: []
168
+
169
+ dependencies: []
170
+