crusher-eventmachine 0.12.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. data/README +81 -0
  2. data/Rakefile +370 -0
  3. data/docs/COPYING +60 -0
  4. data/docs/ChangeLog +211 -0
  5. data/docs/DEFERRABLES +246 -0
  6. data/docs/EPOLL +141 -0
  7. data/docs/GNU +281 -0
  8. data/docs/INSTALL +13 -0
  9. data/docs/KEYBOARD +42 -0
  10. data/docs/LEGAL +25 -0
  11. data/docs/LIGHTWEIGHT_CONCURRENCY +130 -0
  12. data/docs/PURE_RUBY +75 -0
  13. data/docs/RELEASE_NOTES +94 -0
  14. data/docs/SMTP +4 -0
  15. data/docs/SPAWNED_PROCESSES +148 -0
  16. data/docs/TODO +8 -0
  17. data/eventmachine.gemspec +40 -0
  18. data/examples/ex_channel.rb +43 -0
  19. data/examples/ex_queue.rb +2 -0
  20. data/examples/ex_tick_loop_array.rb +15 -0
  21. data/examples/ex_tick_loop_counter.rb +32 -0
  22. data/examples/helper.rb +2 -0
  23. data/ext/binder.cpp +124 -0
  24. data/ext/binder.h +46 -0
  25. data/ext/cmain.cpp +852 -0
  26. data/ext/cplusplus.cpp +202 -0
  27. data/ext/ed.cpp +1884 -0
  28. data/ext/ed.h +418 -0
  29. data/ext/em.cpp +2377 -0
  30. data/ext/em.h +239 -0
  31. data/ext/emwin.cpp +300 -0
  32. data/ext/emwin.h +94 -0
  33. data/ext/epoll.cpp +26 -0
  34. data/ext/epoll.h +25 -0
  35. data/ext/eventmachine.h +124 -0
  36. data/ext/eventmachine_cpp.h +96 -0
  37. data/ext/extconf.rb +150 -0
  38. data/ext/fastfilereader/extconf.rb +85 -0
  39. data/ext/fastfilereader/mapper.cpp +214 -0
  40. data/ext/fastfilereader/mapper.h +59 -0
  41. data/ext/fastfilereader/rubymain.cpp +127 -0
  42. data/ext/files.cpp +94 -0
  43. data/ext/files.h +65 -0
  44. data/ext/kb.cpp +79 -0
  45. data/ext/page.cpp +107 -0
  46. data/ext/page.h +51 -0
  47. data/ext/pipe.cpp +347 -0
  48. data/ext/project.h +157 -0
  49. data/ext/rubymain.cpp +1215 -0
  50. data/ext/sigs.cpp +89 -0
  51. data/ext/sigs.h +32 -0
  52. data/ext/ssl.cpp +460 -0
  53. data/ext/ssl.h +94 -0
  54. data/java/.classpath +8 -0
  55. data/java/.project +17 -0
  56. data/java/src/com/rubyeventmachine/EmReactor.java +571 -0
  57. data/java/src/com/rubyeventmachine/EmReactorException.java +40 -0
  58. data/java/src/com/rubyeventmachine/EventableChannel.java +69 -0
  59. data/java/src/com/rubyeventmachine/EventableDatagramChannel.java +189 -0
  60. data/java/src/com/rubyeventmachine/EventableSocketChannel.java +364 -0
  61. data/java/src/com/rubyeventmachine/application/Application.java +194 -0
  62. data/java/src/com/rubyeventmachine/application/Connection.java +74 -0
  63. data/java/src/com/rubyeventmachine/application/ConnectionFactory.java +37 -0
  64. data/java/src/com/rubyeventmachine/application/DefaultConnectionFactory.java +46 -0
  65. data/java/src/com/rubyeventmachine/application/PeriodicTimer.java +38 -0
  66. data/java/src/com/rubyeventmachine/application/Timer.java +54 -0
  67. data/java/src/com/rubyeventmachine/tests/ApplicationTest.java +109 -0
  68. data/java/src/com/rubyeventmachine/tests/ConnectTest.java +148 -0
  69. data/java/src/com/rubyeventmachine/tests/EMTest.java +80 -0
  70. data/java/src/com/rubyeventmachine/tests/TestDatagrams.java +53 -0
  71. data/java/src/com/rubyeventmachine/tests/TestServers.java +75 -0
  72. data/java/src/com/rubyeventmachine/tests/TestTimers.java +90 -0
  73. data/lib/em/buftok.rb +138 -0
  74. data/lib/em/callback.rb +26 -0
  75. data/lib/em/channel.rb +57 -0
  76. data/lib/em/connection.rb +569 -0
  77. data/lib/em/deferrable.rb +206 -0
  78. data/lib/em/file_watch.rb +54 -0
  79. data/lib/em/future.rb +61 -0
  80. data/lib/em/iterator.rb +270 -0
  81. data/lib/em/messages.rb +66 -0
  82. data/lib/em/process_watch.rb +44 -0
  83. data/lib/em/processes.rb +119 -0
  84. data/lib/em/protocols.rb +36 -0
  85. data/lib/em/protocols/header_and_content.rb +138 -0
  86. data/lib/em/protocols/httpclient.rb +276 -0
  87. data/lib/em/protocols/httpclient2.rb +590 -0
  88. data/lib/em/protocols/line_and_text.rb +125 -0
  89. data/lib/em/protocols/linetext2.rb +161 -0
  90. data/lib/em/protocols/memcache.rb +323 -0
  91. data/lib/em/protocols/object_protocol.rb +45 -0
  92. data/lib/em/protocols/postgres3.rb +247 -0
  93. data/lib/em/protocols/saslauth.rb +175 -0
  94. data/lib/em/protocols/smtpclient.rb +357 -0
  95. data/lib/em/protocols/smtpserver.rb +640 -0
  96. data/lib/em/protocols/socks4.rb +66 -0
  97. data/lib/em/protocols/stomp.rb +200 -0
  98. data/lib/em/protocols/tcptest.rb +53 -0
  99. data/lib/em/pure_ruby.rb +1019 -0
  100. data/lib/em/queue.rb +62 -0
  101. data/lib/em/spawnable.rb +85 -0
  102. data/lib/em/streamer.rb +130 -0
  103. data/lib/em/tick_loop.rb +85 -0
  104. data/lib/em/timers.rb +57 -0
  105. data/lib/em/version.rb +3 -0
  106. data/lib/eventmachine.rb +1540 -0
  107. data/lib/evma.rb +32 -0
  108. data/lib/evma/callback.rb +32 -0
  109. data/lib/evma/container.rb +75 -0
  110. data/lib/evma/factory.rb +77 -0
  111. data/lib/evma/protocol.rb +87 -0
  112. data/lib/evma/reactor.rb +48 -0
  113. data/lib/jeventmachine.rb +257 -0
  114. data/setup.rb +1585 -0
  115. data/tasks/cpp.rake_example +77 -0
  116. data/tests/client.crt +31 -0
  117. data/tests/client.key +51 -0
  118. data/tests/test_attach.rb +136 -0
  119. data/tests/test_basic.rb +249 -0
  120. data/tests/test_channel.rb +63 -0
  121. data/tests/test_connection_count.rb +35 -0
  122. data/tests/test_defer.rb +49 -0
  123. data/tests/test_deferrable.rb +35 -0
  124. data/tests/test_epoll.rb +160 -0
  125. data/tests/test_error_handler.rb +35 -0
  126. data/tests/test_errors.rb +82 -0
  127. data/tests/test_exc.rb +55 -0
  128. data/tests/test_file_watch.rb +49 -0
  129. data/tests/test_futures.rb +198 -0
  130. data/tests/test_get_sock_opt.rb +30 -0
  131. data/tests/test_handler_check.rb +37 -0
  132. data/tests/test_hc.rb +190 -0
  133. data/tests/test_httpclient.rb +227 -0
  134. data/tests/test_httpclient2.rb +154 -0
  135. data/tests/test_inactivity_timeout.rb +50 -0
  136. data/tests/test_kb.rb +60 -0
  137. data/tests/test_ltp.rb +190 -0
  138. data/tests/test_ltp2.rb +317 -0
  139. data/tests/test_next_tick.rb +133 -0
  140. data/tests/test_object_protocol.rb +37 -0
  141. data/tests/test_pause.rb +70 -0
  142. data/tests/test_pending_connect_timeout.rb +48 -0
  143. data/tests/test_process_watch.rb +50 -0
  144. data/tests/test_processes.rb +128 -0
  145. data/tests/test_proxy_connection.rb +144 -0
  146. data/tests/test_pure.rb +134 -0
  147. data/tests/test_queue.rb +44 -0
  148. data/tests/test_running.rb +42 -0
  149. data/tests/test_sasl.rb +72 -0
  150. data/tests/test_send_file.rb +251 -0
  151. data/tests/test_servers.rb +76 -0
  152. data/tests/test_smtpclient.rb +83 -0
  153. data/tests/test_smtpserver.rb +85 -0
  154. data/tests/test_spawn.rb +322 -0
  155. data/tests/test_ssl_args.rb +79 -0
  156. data/tests/test_ssl_methods.rb +50 -0
  157. data/tests/test_ssl_verify.rb +82 -0
  158. data/tests/test_tick_loop.rb +59 -0
  159. data/tests/test_timers.rb +160 -0
  160. data/tests/test_ud.rb +36 -0
  161. data/tests/testem.rb +31 -0
  162. metadata +251 -0
data/tests/testem.rb ADDED
@@ -0,0 +1,31 @@
1
+ # $Id$
2
+
3
+ require 'test/unit'
4
+
5
+ module EmTestRunner
6
+ @em_root = File.expand_path(File.dirname(__FILE__) + '/../')
7
+ @lib_dir = File.join(@em_root, 'lib')
8
+ @ext_dir = File.join(@em_root, 'ext')
9
+ @java_dir = File.join(@em_root, 'java')
10
+
11
+ def self.run(glob = 'test_*.rb')
12
+ $:.unshift(@lib_dir)
13
+ $:.unshift(@ext_dir)
14
+ $:.unshift(@java_dir)
15
+
16
+ case glob
17
+ when Array
18
+ files = glob
19
+ else
20
+ files = Dir[File.dirname(__FILE__) + '/' + glob]
21
+ end
22
+
23
+ files.each do |tc|
24
+ require tc
25
+ end
26
+ end
27
+ end
28
+
29
+ if __FILE__ == $0
30
+ EmTestRunner.run
31
+ end
metadata ADDED
@@ -0,0 +1,251 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: crusher-eventmachine
3
+ version: !ruby/object:Gem::Version
4
+ hash: 57
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 12
9
+ - 11
10
+ version: 0.12.11
11
+ platform: ruby
12
+ authors:
13
+ - Francis Cianfrocca
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-05-29 00:00:00 -07:00
19
+ default_executable:
20
+ dependencies: []
21
+
22
+ description: |
23
+ 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
+ email: garbagecat10@gmail.com
35
+ executables: []
36
+
37
+ extensions:
38
+ - ext/extconf.rb
39
+ - ext/fastfilereader/extconf.rb
40
+ extra_rdoc_files: []
41
+
42
+ files:
43
+ - README
44
+ - Rakefile
45
+ - docs/COPYING
46
+ - docs/ChangeLog
47
+ - docs/DEFERRABLES
48
+ - docs/EPOLL
49
+ - docs/GNU
50
+ - docs/INSTALL
51
+ - docs/KEYBOARD
52
+ - docs/LEGAL
53
+ - docs/LIGHTWEIGHT_CONCURRENCY
54
+ - docs/PURE_RUBY
55
+ - docs/RELEASE_NOTES
56
+ - docs/SMTP
57
+ - docs/SPAWNED_PROCESSES
58
+ - docs/TODO
59
+ - eventmachine.gemspec
60
+ - examples/ex_channel.rb
61
+ - examples/ex_queue.rb
62
+ - examples/ex_tick_loop_array.rb
63
+ - examples/ex_tick_loop_counter.rb
64
+ - examples/helper.rb
65
+ - ext/binder.cpp
66
+ - ext/binder.h
67
+ - ext/cmain.cpp
68
+ - ext/cplusplus.cpp
69
+ - ext/ed.cpp
70
+ - ext/ed.h
71
+ - ext/em.cpp
72
+ - ext/em.h
73
+ - ext/emwin.cpp
74
+ - ext/emwin.h
75
+ - ext/epoll.cpp
76
+ - ext/epoll.h
77
+ - ext/eventmachine.h
78
+ - ext/eventmachine_cpp.h
79
+ - ext/extconf.rb
80
+ - ext/fastfilereader/extconf.rb
81
+ - ext/fastfilereader/mapper.cpp
82
+ - ext/fastfilereader/mapper.h
83
+ - ext/fastfilereader/rubymain.cpp
84
+ - ext/files.cpp
85
+ - ext/files.h
86
+ - ext/kb.cpp
87
+ - ext/page.cpp
88
+ - ext/page.h
89
+ - ext/pipe.cpp
90
+ - ext/project.h
91
+ - ext/rubymain.cpp
92
+ - ext/sigs.cpp
93
+ - ext/sigs.h
94
+ - ext/ssl.cpp
95
+ - ext/ssl.h
96
+ - java/.classpath
97
+ - java/.project
98
+ - java/src/com/rubyeventmachine/EmReactor.java
99
+ - java/src/com/rubyeventmachine/EmReactorException.java
100
+ - java/src/com/rubyeventmachine/EventableChannel.java
101
+ - java/src/com/rubyeventmachine/EventableDatagramChannel.java
102
+ - java/src/com/rubyeventmachine/EventableSocketChannel.java
103
+ - java/src/com/rubyeventmachine/application/Application.java
104
+ - java/src/com/rubyeventmachine/application/Connection.java
105
+ - java/src/com/rubyeventmachine/application/ConnectionFactory.java
106
+ - java/src/com/rubyeventmachine/application/DefaultConnectionFactory.java
107
+ - java/src/com/rubyeventmachine/application/PeriodicTimer.java
108
+ - java/src/com/rubyeventmachine/application/Timer.java
109
+ - java/src/com/rubyeventmachine/tests/ApplicationTest.java
110
+ - java/src/com/rubyeventmachine/tests/ConnectTest.java
111
+ - java/src/com/rubyeventmachine/tests/EMTest.java
112
+ - java/src/com/rubyeventmachine/tests/TestDatagrams.java
113
+ - java/src/com/rubyeventmachine/tests/TestServers.java
114
+ - java/src/com/rubyeventmachine/tests/TestTimers.java
115
+ - lib/em/buftok.rb
116
+ - lib/em/callback.rb
117
+ - lib/em/channel.rb
118
+ - lib/em/connection.rb
119
+ - lib/em/deferrable.rb
120
+ - lib/em/file_watch.rb
121
+ - lib/em/future.rb
122
+ - lib/em/iterator.rb
123
+ - lib/em/messages.rb
124
+ - lib/em/process_watch.rb
125
+ - lib/em/processes.rb
126
+ - lib/em/protocols.rb
127
+ - lib/em/protocols/header_and_content.rb
128
+ - lib/em/protocols/httpclient.rb
129
+ - lib/em/protocols/httpclient2.rb
130
+ - lib/em/protocols/line_and_text.rb
131
+ - lib/em/protocols/linetext2.rb
132
+ - lib/em/protocols/memcache.rb
133
+ - lib/em/protocols/object_protocol.rb
134
+ - lib/em/protocols/postgres3.rb
135
+ - lib/em/protocols/saslauth.rb
136
+ - lib/em/protocols/smtpclient.rb
137
+ - lib/em/protocols/smtpserver.rb
138
+ - lib/em/protocols/socks4.rb
139
+ - lib/em/protocols/stomp.rb
140
+ - lib/em/protocols/tcptest.rb
141
+ - lib/em/pure_ruby.rb
142
+ - lib/em/queue.rb
143
+ - lib/em/spawnable.rb
144
+ - lib/em/streamer.rb
145
+ - lib/em/tick_loop.rb
146
+ - lib/em/timers.rb
147
+ - lib/em/version.rb
148
+ - lib/eventmachine.rb
149
+ - lib/evma.rb
150
+ - lib/evma/callback.rb
151
+ - lib/evma/container.rb
152
+ - lib/evma/factory.rb
153
+ - lib/evma/protocol.rb
154
+ - lib/evma/reactor.rb
155
+ - lib/jeventmachine.rb
156
+ - setup.rb
157
+ - tasks/cpp.rake_example
158
+ - tests/client.crt
159
+ - tests/client.key
160
+ - tests/test_attach.rb
161
+ - tests/test_basic.rb
162
+ - tests/test_channel.rb
163
+ - tests/test_connection_count.rb
164
+ - tests/test_defer.rb
165
+ - tests/test_deferrable.rb
166
+ - tests/test_epoll.rb
167
+ - tests/test_error_handler.rb
168
+ - tests/test_errors.rb
169
+ - tests/test_exc.rb
170
+ - tests/test_file_watch.rb
171
+ - tests/test_futures.rb
172
+ - tests/test_get_sock_opt.rb
173
+ - tests/test_handler_check.rb
174
+ - tests/test_hc.rb
175
+ - tests/test_httpclient.rb
176
+ - tests/test_httpclient2.rb
177
+ - tests/test_inactivity_timeout.rb
178
+ - tests/test_kb.rb
179
+ - tests/test_ltp.rb
180
+ - tests/test_ltp2.rb
181
+ - tests/test_next_tick.rb
182
+ - tests/test_object_protocol.rb
183
+ - tests/test_pause.rb
184
+ - tests/test_pending_connect_timeout.rb
185
+ - tests/test_process_watch.rb
186
+ - tests/test_processes.rb
187
+ - tests/test_proxy_connection.rb
188
+ - tests/test_pure.rb
189
+ - tests/test_queue.rb
190
+ - tests/test_running.rb
191
+ - tests/test_sasl.rb
192
+ - tests/test_send_file.rb
193
+ - tests/test_servers.rb
194
+ - tests/test_smtpclient.rb
195
+ - tests/test_smtpserver.rb
196
+ - tests/test_spawn.rb
197
+ - tests/test_ssl_args.rb
198
+ - tests/test_ssl_methods.rb
199
+ - tests/test_ssl_verify.rb
200
+ - tests/test_tick_loop.rb
201
+ - tests/test_timers.rb
202
+ - tests/test_ud.rb
203
+ - tests/testem.rb
204
+ has_rdoc: true
205
+ homepage: http://rubyeventmachine.com
206
+ licenses: []
207
+
208
+ post_install_message:
209
+ rdoc_options:
210
+ - --title
211
+ - EventMachine
212
+ - --main
213
+ - README
214
+ - --line-numbers
215
+ - -x
216
+ - lib/em/version
217
+ - -x
218
+ - lib/emva
219
+ - -x
220
+ - lib/evma/
221
+ - -x
222
+ - lib/jeventmachine
223
+ require_paths:
224
+ - lib
225
+ required_ruby_version: !ruby/object:Gem::Requirement
226
+ none: false
227
+ requirements:
228
+ - - ">="
229
+ - !ruby/object:Gem::Version
230
+ hash: 3
231
+ segments:
232
+ - 0
233
+ version: "0"
234
+ required_rubygems_version: !ruby/object:Gem::Requirement
235
+ none: false
236
+ requirements:
237
+ - - ">="
238
+ - !ruby/object:Gem::Version
239
+ hash: 3
240
+ segments:
241
+ - 0
242
+ version: "0"
243
+ requirements: []
244
+
245
+ rubyforge_project: eventmachine
246
+ rubygems_version: 1.3.7
247
+ signing_key:
248
+ specification_version: 3
249
+ summary: Ruby/EventMachine library
250
+ test_files: []
251
+