evdispatch 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. data/Manifest.txt +21 -65
  2. data/ext/revdispatch/dispatch.cc +3 -0
  3. data/ext/revdispatch/extconf.rb +50 -32
  4. data/ext/revdispatch/{libdispatch-0.1 → libdispatch}/libev-3.31/ev++.h +0 -0
  5. data/ext/revdispatch/{libdispatch-0.1 → libdispatch}/libev-3.31/ev.c +0 -0
  6. data/ext/revdispatch/{libdispatch-0.1 → libdispatch}/libev-3.31/ev.h +0 -0
  7. data/ext/revdispatch/{libdispatch-0.1 → libdispatch}/libev-3.31/ev_epoll.c +0 -0
  8. data/ext/revdispatch/{libdispatch-0.1 → libdispatch}/libev-3.31/ev_kqueue.c +0 -0
  9. data/ext/revdispatch/{libdispatch-0.1 → libdispatch}/libev-3.31/ev_poll.c +0 -0
  10. data/ext/revdispatch/{libdispatch-0.1 → libdispatch}/libev-3.31/ev_port.c +0 -0
  11. data/ext/revdispatch/{libdispatch-0.1 → libdispatch}/libev-3.31/ev_select.c +0 -0
  12. data/ext/revdispatch/{libdispatch-0.1 → libdispatch}/libev-3.31/ev_vars.h +0 -0
  13. data/ext/revdispatch/{libdispatch-0.1 → libdispatch}/libev-3.31/ev_win32.c +0 -0
  14. data/ext/revdispatch/{libdispatch-0.1 → libdispatch}/libev-3.31/ev_wrap.h +0 -0
  15. data/ext/revdispatch/{libdispatch-0.1 → libdispatch}/libev-3.31/event.c +0 -0
  16. data/ext/revdispatch/{libdispatch-0.1 → libdispatch}/libev-3.31/event.h +0 -0
  17. data/ext/revdispatch/{libdispatch-0.1 → libdispatch}/src/ev_dispatch.cc +6 -17
  18. data/ext/revdispatch/{libdispatch-0.1 → libdispatch}/src/ev_dispatch.h +0 -0
  19. data/ext/revdispatch/libdispatch/src/ev_embed.c +6 -0
  20. data/ext/revdispatch/{libdispatch-0.1 → libdispatch}/src/ev_http.cc +11 -8
  21. data/ext/revdispatch/{libdispatch-0.1 → libdispatch}/src/ev_http.h +0 -0
  22. data/lib/evdispatch/version.rb +2 -2
  23. data/website/index.html +7 -1
  24. data/website/index.txt +6 -0
  25. metadata +23 -67
  26. data/ext/revdispatch/libdispatch-0.1/Changelog +0 -12
  27. data/ext/revdispatch/libdispatch-0.1/LICENSE +0 -0
  28. data/ext/revdispatch/libdispatch-0.1/Makefile.am +0 -10
  29. data/ext/revdispatch/libdispatch-0.1/Makefile.in +0 -636
  30. data/ext/revdispatch/libdispatch-0.1/README +0 -3
  31. data/ext/revdispatch/libdispatch-0.1/aclocal.m4 +0 -7268
  32. data/ext/revdispatch/libdispatch-0.1/autogen.sh +0 -11
  33. data/ext/revdispatch/libdispatch-0.1/config.guess +0 -1516
  34. data/ext/revdispatch/libdispatch-0.1/config.h.in +0 -112
  35. data/ext/revdispatch/libdispatch-0.1/config.sub +0 -1626
  36. data/ext/revdispatch/libdispatch-0.1/configure +0 -21779
  37. data/ext/revdispatch/libdispatch-0.1/configure.ac +0 -42
  38. data/ext/revdispatch/libdispatch-0.1/depcomp +0 -584
  39. data/ext/revdispatch/libdispatch-0.1/install-sh +0 -507
  40. data/ext/revdispatch/libdispatch-0.1/libev-3.31/Changes +0 -78
  41. data/ext/revdispatch/libdispatch-0.1/libev-3.31/LICENSE +0 -25
  42. data/ext/revdispatch/libdispatch-0.1/libev-3.31/Makefile.am +0 -18
  43. data/ext/revdispatch/libdispatch-0.1/libev-3.31/Makefile.in +0 -677
  44. data/ext/revdispatch/libdispatch-0.1/libev-3.31/README +0 -130
  45. data/ext/revdispatch/libdispatch-0.1/libev-3.31/aclocal.m4 +0 -7268
  46. data/ext/revdispatch/libdispatch-0.1/libev-3.31/autogen.sh +0 -6
  47. data/ext/revdispatch/libdispatch-0.1/libev-3.31/config.guess +0 -1516
  48. data/ext/revdispatch/libdispatch-0.1/libev-3.31/config.h.in +0 -112
  49. data/ext/revdispatch/libdispatch-0.1/libev-3.31/config.sub +0 -1626
  50. data/ext/revdispatch/libdispatch-0.1/libev-3.31/configure +0 -21500
  51. data/ext/revdispatch/libdispatch-0.1/libev-3.31/configure.ac +0 -18
  52. data/ext/revdispatch/libdispatch-0.1/libev-3.31/ev.3 +0 -3344
  53. data/ext/revdispatch/libdispatch-0.1/libev-3.31/ev.pod +0 -3268
  54. data/ext/revdispatch/libdispatch-0.1/libev-3.31/install-sh +0 -294
  55. data/ext/revdispatch/libdispatch-0.1/libev-3.31/libev.m4 +0 -28
  56. data/ext/revdispatch/libdispatch-0.1/libev-3.31/ltmain.sh +0 -6871
  57. data/ext/revdispatch/libdispatch-0.1/libev-3.31/missing +0 -336
  58. data/ext/revdispatch/libdispatch-0.1/libev-3.31/mkinstalldirs +0 -111
  59. data/ext/revdispatch/libdispatch-0.1/ltmain.sh +0 -6930
  60. data/ext/revdispatch/libdispatch-0.1/missing +0 -367
  61. data/ext/revdispatch/libdispatch-0.1/src/Makefile.am +0 -11
  62. data/ext/revdispatch/libdispatch-0.1/src/Makefile.in +0 -485
  63. data/ext/revdispatch/libdispatch-0.1/test/Makefile.am +0 -30
  64. data/ext/revdispatch/libdispatch-0.1/test/Makefile.in +0 -623
  65. data/ext/revdispatch/libdispatch-0.1/test/key_test.cc +0 -52
  66. data/ext/revdispatch/libdispatch-0.1/test/next_test.cc +0 -84
  67. data/ext/revdispatch/libdispatch-0.1/test/opt_test.cc +0 -70
  68. data/ext/revdispatch/libdispatch-0.1/test/pipe_test.cc +0 -241
  69. data/ext/revdispatch/libdispatch-0.1/test/post_test.cc +0 -66
  70. data/ext/revdispatch/libdispatch-0.1/test/stress_test.cc +0 -62
@@ -33,70 +33,26 @@ ext/revdispatch/stest.rb
33
33
  ext/revdispatch/extconf.rb
34
34
  ext/revdispatch/revdispatch.cc
35
35
  ext/revdispatch/rhttp.cc
36
+ ext/revdispatch/dispatch.cc
36
37
  ext/revdispatch/rhttp.h
37
38
  ext/revdispatch/util.h
38
- ext/revdispatch/libdispatch-0.1/
39
- ext/revdispatch/libdispatch-0.1/src/
40
- ext/revdispatch/libdispatch-0.1/test/
41
- ext/revdispatch/libdispatch-0.1/Changelog
42
- ext/revdispatch/libdispatch-0.1/LICENSE
43
- ext/revdispatch/libdispatch-0.1/Makefile.am
44
- ext/revdispatch/libdispatch-0.1/Makefile.in
45
- ext/revdispatch/libdispatch-0.1/README
46
- ext/revdispatch/libdispatch-0.1/aclocal.m4
47
- ext/revdispatch/libdispatch-0.1/autogen.sh
48
- ext/revdispatch/libdispatch-0.1/config.guess
49
- ext/revdispatch/libdispatch-0.1/config.h.in
50
- ext/revdispatch/libdispatch-0.1/config.sub
51
- ext/revdispatch/libdispatch-0.1/configure
52
- ext/revdispatch/libdispatch-0.1/configure.ac
53
- ext/revdispatch/libdispatch-0.1/depcomp
54
- ext/revdispatch/libdispatch-0.1/install-sh
55
- ext/revdispatch/libdispatch-0.1/ltmain.sh
56
- ext/revdispatch/libdispatch-0.1/missing
57
- ext/revdispatch/libdispatch-0.1/libev-3.31/ev++.h
58
- ext/revdispatch/libdispatch-0.1/libev-3.31/ev.c
59
- ext/revdispatch/libdispatch-0.1/libev-3.31/ev.h
60
- ext/revdispatch/libdispatch-0.1/libev-3.31/ev_epoll.c
61
- ext/revdispatch/libdispatch-0.1/libev-3.31/ev_kqueue.c
62
- ext/revdispatch/libdispatch-0.1/libev-3.31/ev_poll.c
63
- ext/revdispatch/libdispatch-0.1/libev-3.31/ev_port.c
64
- ext/revdispatch/libdispatch-0.1/libev-3.31/ev_select.c
65
- ext/revdispatch/libdispatch-0.1/libev-3.31/ev_vars.h
66
- ext/revdispatch/libdispatch-0.1/libev-3.31/ev_win32.c
67
- ext/revdispatch/libdispatch-0.1/libev-3.31/ev_wrap.h
68
- ext/revdispatch/libdispatch-0.1/libev-3.31/event.c
69
- ext/revdispatch/libdispatch-0.1/libev-3.31/event.h
70
- ext/revdispatch/libdispatch-0.1/libev-3.31/Changes
71
- ext/revdispatch/libdispatch-0.1/libev-3.31/LICENSE
72
- ext/revdispatch/libdispatch-0.1/libev-3.31/Makefile.am
73
- ext/revdispatch/libdispatch-0.1/libev-3.31/Makefile.in
74
- ext/revdispatch/libdispatch-0.1/libev-3.31/README
75
- ext/revdispatch/libdispatch-0.1/libev-3.31/aclocal.m4
76
- ext/revdispatch/libdispatch-0.1/libev-3.31/autogen.sh
77
- ext/revdispatch/libdispatch-0.1/libev-3.31/config.guess
78
- ext/revdispatch/libdispatch-0.1/libev-3.31/config.h.in
79
- ext/revdispatch/libdispatch-0.1/libev-3.31/config.sub
80
- ext/revdispatch/libdispatch-0.1/libev-3.31/configure
81
- ext/revdispatch/libdispatch-0.1/libev-3.31/configure.ac
82
- ext/revdispatch/libdispatch-0.1/libev-3.31/ev.3
83
- ext/revdispatch/libdispatch-0.1/libev-3.31/ev.pod
84
- ext/revdispatch/libdispatch-0.1/libev-3.31/install-sh
85
- ext/revdispatch/libdispatch-0.1/libev-3.31/libev.m4
86
- ext/revdispatch/libdispatch-0.1/libev-3.31/ltmain.sh
87
- ext/revdispatch/libdispatch-0.1/libev-3.31/missing
88
- ext/revdispatch/libdispatch-0.1/libev-3.31/mkinstalldirs
89
- ext/revdispatch/libdispatch-0.1/src/ev_dispatch.h
90
- ext/revdispatch/libdispatch-0.1/src/ev_http.h
91
- ext/revdispatch/libdispatch-0.1/src/Makefile.am
92
- ext/revdispatch/libdispatch-0.1/src/Makefile.in
93
- ext/revdispatch/libdispatch-0.1/src/ev_dispatch.cc
94
- ext/revdispatch/libdispatch-0.1/src/ev_http.cc
95
- ext/revdispatch/libdispatch-0.1/test/Makefile.am
96
- ext/revdispatch/libdispatch-0.1/test/Makefile.in
97
- ext/revdispatch/libdispatch-0.1/test/key_test.cc
98
- ext/revdispatch/libdispatch-0.1/test/next_test.cc
99
- ext/revdispatch/libdispatch-0.1/test/pipe_test.cc
100
- ext/revdispatch/libdispatch-0.1/test/opt_test.cc
101
- ext/revdispatch/libdispatch-0.1/test/post_test.cc
102
- ext/revdispatch/libdispatch-0.1/test/stress_test.cc
39
+ ext/revdispatch/libdispatch/
40
+ ext/revdispatch/libdispatch/src/
41
+ ext/revdispatch/libdispatch/libev-3.31/ev++.h
42
+ ext/revdispatch/libdispatch/libev-3.31/ev.c
43
+ ext/revdispatch/libdispatch/libev-3.31/ev.h
44
+ ext/revdispatch/libdispatch/libev-3.31/ev_epoll.c
45
+ ext/revdispatch/libdispatch/libev-3.31/ev_kqueue.c
46
+ ext/revdispatch/libdispatch/libev-3.31/ev_poll.c
47
+ ext/revdispatch/libdispatch/libev-3.31/ev_port.c
48
+ ext/revdispatch/libdispatch/libev-3.31/ev_select.c
49
+ ext/revdispatch/libdispatch/libev-3.31/ev_vars.h
50
+ ext/revdispatch/libdispatch/libev-3.31/ev_win32.c
51
+ ext/revdispatch/libdispatch/libev-3.31/ev_wrap.h
52
+ ext/revdispatch/libdispatch/libev-3.31/event.c
53
+ ext/revdispatch/libdispatch/libev-3.31/event.h
54
+ ext/revdispatch/libdispatch/src/ev_dispatch.h
55
+ ext/revdispatch/libdispatch/src/ev_http.h
56
+ ext/revdispatch/libdispatch/src/ev_dispatch.cc
57
+ ext/revdispatch/libdispatch/src/ev_http.cc
58
+ ext/revdispatch/libdispatch/src/ev_embed.c
@@ -0,0 +1,3 @@
1
+ #include "ev_embed.c"
2
+ #include "ev_dispatch.cc"
3
+ #include "ev_http.cc"
@@ -1,39 +1,57 @@
1
1
  require 'mkmf'
2
2
 
3
- libdispatch=File.expand_path("./libdispatch-0.1")
4
- libev="libev-3.31"
5
-
6
- if !File.exist?("#{libdispatch}/src/.libs") or !File.exist?("#{libdispatch}/#{libev}/.libs")
7
- system("chmod a+x #{libdispatch}/configure")
8
- system("chmod a+x #{libdispatch}/#{libev}/configure")
9
- # configure and build #{libev} and #{libdispatch} we'll link against the static libraries
10
- if !system("cd #{libdispatch} && ./configure --disable-shared && make")
11
- STDERR.puts "Failed to compile #{libdispatch}er"
12
- exit(1)
13
- end
14
-
15
- if( !`uname -m `.grep(/ppc/i).empty? )
16
- system("ranlib #{libdispatch}/src/.libs/libdispatch.a")
17
- system("ranlib #{libdispatch}/#{libev}/.libs/libev.a")
18
- end
19
- end
20
-
21
- # put the header files first
22
- $CPPFLAGS = " -Wall -I#{libdispatch}/ -I#{libdispatch}/src -I#{libdispatch}/#{libev}/ #{$CPPFLAGS}"
23
-
24
- # link to the static library versions of libdispatch and #{libev}
25
- if( !`uname`.grep(/linux/i).empty? )
26
- $LDFLAGS << " #{libdispatch}/src/.libs/libdispatch.a #{libdispatch}/#{libev}/.libs/libev.a "
27
- end
28
- $LIBS << " -L#{libdispatch}/#{libev}/.libs/ -lev"
29
- $LIBS << " -L#{libdispatch}/src/.libs/ -ldispatch"
3
+ flags = []
30
4
 
31
- dir_config("revdispatch")
5
+ # configuration for libev
6
+ if have_header('sys/select.h')
7
+ flags << '-DEV_USE_SELECT'
8
+ end
9
+
10
+ if have_header('poll.h')
11
+ flags << '-DEV_USE_POLL'
12
+ end
13
+
14
+ if have_header('sys/epoll.h')
15
+ flags << '-DEV_USE_EPOLL'
16
+ end
17
+
18
+ if have_header('sys/event.h') and have_header('sys/queue.h')
19
+ flags << '-DEV_USE_KQUEUE'
20
+ end
21
+
22
+ if have_header('port.h')
23
+ flags << '-DEV_USE_PORT'
24
+ end
25
+
26
+ if have_header('sys/inotify.h')
27
+ flags << '-DEV_USE_INOTIFY'
28
+ end
32
29
  have_library("c", "main")
33
30
  have_library("stdc++", "main")
34
- have_library("rt", "clock_gettime")
35
- have_library("pthread", "pthread_create")
36
- have_library("curl", "curl_easy_init")
31
+ if have_library("rt", "clock_gettime")
32
+ flags << '-DHAVE_LIBRT=1'
33
+ end
34
+ if !have_library("pthread", "pthread_create")
35
+ STDERR.puts "pthread library required to build evdispatch"
36
+ exit(1)
37
+ end
38
+ if have_header("curl/curl.h") and
39
+ have_library("curl", "curl_easy_init") and
40
+ have_library("curl", "curl_multi_socket_action")
41
+ flags << '-DHAVE_CURL_CURL_H=1'
42
+ flags << '-DHAVE_CURL_SOCKET_T=1'
43
+ else
44
+ STDERR.puts "libcurl 7.18.x > required to build evdispatch"
45
+ exit(1)
46
+ end
37
47
 
48
+ build_dir= File.dirname(__FILE__)
49
+ libdispatch_build_dir=File.expand_path(File.join(build_dir,"libdispatch","src"))
50
+ libev_build_dir=File.expand_path(File.join(build_dir,"libdispatch","libev-3.31"))
51
+ $LDFLAGS << " -lpthread -lcurl"
52
+ $CPPFLAGS << " -DBUILD_EXTENSION -I#{libdispatch_build_dir} -I#{libev_build_dir} " << flags.join(' ')
53
+ $defs << "-DRUBY_VERSION_CODE=#{RUBY_VERSION.gsub(/\D/, '')}"
54
+
55
+ dir_config("revdispatch")
38
56
  create_makefile("revdispatch")
39
- puts "LDFLAGS: #{$LDFLAGS}\nLIBS: #{$LIBS}\nCXXFLAGS: #{$CXXFLAGS}"
57
+ puts "LDFLAGS: #{$LDFLAGS}\nLIBS: #{$LIBS}\nCPPFLAGS: #{$CPPFLAGS}"
@@ -7,11 +7,11 @@
7
7
 
8
8
  #ifdef DEBUG
9
9
  #include <assert.h>
10
- #define ASSERT_IS_D_THRAD\
10
+ #define ASSERT_DISPATCH_THREAD\
11
11
  pthread_t tid = pthread_self();\
12
12
  assert( pthread_equal( tid, this->m_tid ) );
13
13
  #else
14
- #define ASSERT_IS_D_THRAD
14
+ #define ASSERT_DISPATCH_THREAD
15
15
  #endif
16
16
 
17
17
  // ---
@@ -33,6 +33,7 @@ int Timer::current_time( struct timeval *tv)
33
33
  #else
34
34
  gettimeofday (tv, 0);
35
35
  #endif
36
+ return tv->tv_sec;
36
37
  }
37
38
 
38
39
  double Timer::elapsed_time( struct timeval *y )
@@ -213,7 +214,7 @@ void Dispatch::request_cb_start( struct ev_loop *loop, struct ev_async *w, int r
213
214
  }
214
215
  void Dispatch::request_cb( struct ev_loop *loop, struct ev_async *w, int revents )
215
216
  {
216
- ASSERT_IS_D_THRAD
217
+ ASSERT_DISPATCH_THREAD
217
218
 
218
219
  // lock and read as much as we can out of the queue
219
220
  m_requests.m_lock.lock();
@@ -304,7 +305,7 @@ void Dispatch::timeout_cb_start(struct ev_loop *loop, struct ev_timer *w, int re
304
305
  // called on the event loop thread
305
306
  void Dispatch::timeout_cb(struct ev_loop *loop, struct ev_timer *w, int revents)
306
307
  {
307
- ASSERT_IS_D_THRAD
308
+ ASSERT_DISPATCH_THREAD
308
309
  //printf("timeout cb\n");
309
310
  }
310
311
 
@@ -334,7 +335,6 @@ Queue<Response>::POP_STATE Dispatch::wait_for_response_by_id( request_t id, Time
334
335
  Response *res = NULL;
335
336
  Queue<Response>::POP_STATE rstate;
336
337
  RespondedTable::iterator loc = m_responded.find(id);
337
- int res_buff_size = m_responded.size();
338
338
 
339
339
  if( loc != m_responded.end() ){ return Queue<Response>::POPPED; }
340
340
 
@@ -346,6 +346,7 @@ Queue<Response>::POP_STATE Dispatch::wait_for_response_by_id( request_t id, Time
346
346
  res = m_responses.m_queue.front();
347
347
  m_responses.m_queue.pop();
348
348
  m_responded[res->id] = res;
349
+ rstate = Queue<Response>::POPPED;
349
350
  }
350
351
  else {
351
352
  // update the timeout to right now
@@ -365,18 +366,6 @@ Queue<Response>::POP_STATE Dispatch::wait_for_response_by_id( request_t id, Time
365
366
  m_responses.m_lock.unlock();
366
367
 
367
368
  return rstate;
368
- /*
369
- timeout.update();
370
- while( (res = m_responses.pop_or_wait( &rstate, m_loop_started, timeout )) ) {
371
- //printf( "res: %s, id: %d\n", res->name.c_str(), res->id );
372
- m_responded[res->id] = res;
373
- if( res->id == id ){ return rstate; }
374
- timeout.update();
375
- }
376
-
377
-
378
- return rstate;
379
- */
380
369
  }
381
370
 
382
371
  Response *Dispatch::get_next_response( Timer timer )
@@ -0,0 +1,6 @@
1
+ #ifdef BUILD_EXTENSION
2
+ #define EV_STANDALONE 1
3
+ #else
4
+ #define EV_CONFIG_H "../config.h"
5
+ #endif
6
+ #include "ev.c"
@@ -7,13 +7,13 @@ namespace EVD {
7
7
 
8
8
  #ifdef DEBUG
9
9
  #include <assert.h>
10
- #define ASSERT_IS_D_THRAD(id)\
10
+ #define ASSERT_HTTP_THREAD(id)\
11
11
  {\
12
12
  pthread_t tid = pthread_self();\
13
13
  assert( pthread_equal(tid, id) );\
14
14
  }
15
15
  #else
16
- #define ASSERT_IS_D_THRAD
16
+ #define ASSERT_HTTP_THREAD
17
17
  #endif
18
18
 
19
19
  static void multi_error_report(CURLMcode rc)
@@ -32,10 +32,10 @@ static void multi_error_report(CURLMcode rc)
32
32
  printf("curlm:bad easy handle: %s\n", curl_multi_strerror(rc) );
33
33
  break;
34
34
  case CURLM_OUT_OF_MEMORY:
35
- printf("curlm:oh shit out of memory: %s\n", curl_multi_strerror(rc) );
35
+ printf("curlm:out of memory: %s\n", curl_multi_strerror(rc) );
36
36
  break;
37
- //case CURLM_INTERNAL_ERROR:
38
- printf("curlm:oh shit internal error: %s\n", curl_multi_strerror(rc) );
37
+ case CURLM_INTERNAL_ERROR:
38
+ printf("curlm:internal error: %s\n", curl_multi_strerror(rc) );
39
39
  break;
40
40
  case CURLM_BAD_SOCKET:
41
41
  printf("curlm:bad socket: %s\n", curl_multi_strerror(rc) );
@@ -43,6 +43,9 @@ static void multi_error_report(CURLMcode rc)
43
43
  case CURLM_UNKNOWN_OPTION:
44
44
  printf("curlm:unknown option: %s\n", curl_multi_strerror(rc) );
45
45
  break;
46
+ default:
47
+ printf("curlm:unknown error: %s\n", curl_multi_strerror(rc) );
48
+ break;
46
49
  }
47
50
  }
48
51
 
@@ -52,7 +55,7 @@ void HttpClient::SocketInfo::response_cb(struct ev_loop *loop, struct ev_io *w,
52
55
  HttpClient::SocketInfo *res = ((HttpClient::SocketInfo*)w->data);
53
56
  HttpClient *client = res->m_client;
54
57
  int ev_bitmask = 0;
55
- ASSERT_IS_D_THRAD(client->m_disp->get_thread_id());
58
+ ASSERT_HTTP_THREAD(client->m_disp->get_thread_id());
56
59
  do {
57
60
  ev_bitmask |= ((revents & EV_READ)?CURL_CSELECT_IN:0) | ((revents & EV_WRITE)?CURL_CSELECT_OUT:0);
58
61
  rc = curl_multi_socket_action( client->m_handle, w->fd, ev_bitmask, &(client->m_active) );
@@ -92,7 +95,7 @@ int HttpClient::sock_cb(CURL *e, curl_socket_t sock, int action, void *cbp, void
92
95
  {
93
96
  HttpClient *client = (HttpClient*)cbp;
94
97
  HttpClient::SocketInfo *sockinfo = (HttpClient::SocketInfo *)sockp;
95
- ASSERT_IS_D_THRAD(client->m_disp->get_thread_id());
98
+ ASSERT_HTTP_THREAD(client->m_disp->get_thread_id());
96
99
 
97
100
  if( !sockinfo ) {
98
101
  sockinfo = new HttpClient::SocketInfo( client, sock, e, action );
@@ -259,7 +262,7 @@ size_t HttpRequest::header_write_cb(void *ptr, size_t size, size_t nmemb, void *
259
262
  // CURLOPT_PROGRESSFUNCTION
260
263
  int HttpRequest::prog_cb(void *p, double dltotal, double dlnow, double ult, double uln)
261
264
  {
262
- HttpRequest *req = (HttpRequest *)p;
265
+ // HttpRequest *req = (HttpRequest *)p;
263
266
  //fprintf(stderr, "Progress: %s (%g/%g)\n", req->url.c_str(), dlnow, dltotal);
264
267
  return 0;
265
268
  }
@@ -1,8 +1,8 @@
1
1
  module Evdispatch #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
- MINOR = 3
5
- TINY = 1
4
+ MINOR = 4
5
+ TINY = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -18,7 +18,7 @@
18
18
  <h1>evdispatch</h1>
19
19
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/evdispatch"; return false'>
20
20
  <p>Get Version</p>
21
- <a href="http://rubyforge.org/projects/evdispatch" class="numbers">0.3.1</a>
21
+ <a href="http://rubyforge.org/projects/evdispatch" class="numbers">0.4.0</a>
22
22
  </div>
23
23
  <h4 style="float:right;padding-right:10px;">&#x2192; &#8216;evdispatch&#8217;</h4>
24
24
 
@@ -140,6 +140,12 @@ Memory utilization stays flat at around 14 to 19 megs with about 2,000 &#8211; 1
140
140
 
141
141
 
142
142
  <ul>
143
+ <li><h5>I get an error when installing the gem: <strong>ev_http.cc:411: error: &#8216;CURLOPT_COPYPOSTFIELDS&#8217; was not declared in this scope</strong></h5>
144
+ <p>
145
+ The minimum version of libcurl required is 7.17.1. see the reference note
146
+ <a href="http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTCOPYPOSTFIELDS">here</a>
147
+ </p>
148
+ </li>
143
149
  <li><h5>I get an error when installing the gem: <strong>&#8220;error: &#8216;curl_socket_t&#8217; has not been
144
150
  declared&#8221;</strong></h5>
145
151
  <p> You need to have at least version 7.17.1 of <a href="http://curl.haxx.se/download.html">libcurl</a>. I recommend at least version: 7.18.1.</p>
@@ -106,6 +106,12 @@ The trunk repository is <a href="http://evdispatch.rubyforge.org/svn/trunk/">htt
106
106
  h2. F.A.Q.
107
107
 
108
108
  <ul>
109
+ <li><h5>I get an error when installing the gem: <strong>ev_http.cc:411: error: 'CURLOPT_COPYPOSTFIELDS' was not declared in this scope</strong></h5>
110
+ <p>
111
+ The minimum version of libcurl required is 7.17.1. see the reference note
112
+ <a href="http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTCOPYPOSTFIELDS">here</a>
113
+ </p>
114
+ </li>
109
115
  <li><h5>I get an error when installing the gem: <strong>"error: 'curl_socket_t' has not been
110
116
  declared"</strong></h5>
111
117
  <p> You need to have at least version 7.17.1 of <a href="http://curl.haxx.se/download.html">libcurl</a>. I recommend at least version: 7.18.1.</p>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evdispatch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Todd A. Fisher
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-04-23 00:00:00 -04:00
12
+ date: 2008-05-04 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -62,73 +62,29 @@ files:
62
62
  - ext/revdispatch/extconf.rb
63
63
  - ext/revdispatch/revdispatch.cc
64
64
  - ext/revdispatch/rhttp.cc
65
+ - ext/revdispatch/dispatch.cc
65
66
  - ext/revdispatch/rhttp.h
66
67
  - ext/revdispatch/util.h
67
- - ext/revdispatch/libdispatch-0.1/
68
- - ext/revdispatch/libdispatch-0.1/src/
69
- - ext/revdispatch/libdispatch-0.1/test/
70
- - ext/revdispatch/libdispatch-0.1/Changelog
71
- - ext/revdispatch/libdispatch-0.1/LICENSE
72
- - ext/revdispatch/libdispatch-0.1/Makefile.am
73
- - ext/revdispatch/libdispatch-0.1/Makefile.in
74
- - ext/revdispatch/libdispatch-0.1/README
75
- - ext/revdispatch/libdispatch-0.1/aclocal.m4
76
- - ext/revdispatch/libdispatch-0.1/autogen.sh
77
- - ext/revdispatch/libdispatch-0.1/config.guess
78
- - ext/revdispatch/libdispatch-0.1/config.h.in
79
- - ext/revdispatch/libdispatch-0.1/config.sub
80
- - ext/revdispatch/libdispatch-0.1/configure
81
- - ext/revdispatch/libdispatch-0.1/configure.ac
82
- - ext/revdispatch/libdispatch-0.1/depcomp
83
- - ext/revdispatch/libdispatch-0.1/install-sh
84
- - ext/revdispatch/libdispatch-0.1/ltmain.sh
85
- - ext/revdispatch/libdispatch-0.1/missing
86
- - ext/revdispatch/libdispatch-0.1/libev-3.31/ev++.h
87
- - ext/revdispatch/libdispatch-0.1/libev-3.31/ev.c
88
- - ext/revdispatch/libdispatch-0.1/libev-3.31/ev.h
89
- - ext/revdispatch/libdispatch-0.1/libev-3.31/ev_epoll.c
90
- - ext/revdispatch/libdispatch-0.1/libev-3.31/ev_kqueue.c
91
- - ext/revdispatch/libdispatch-0.1/libev-3.31/ev_poll.c
92
- - ext/revdispatch/libdispatch-0.1/libev-3.31/ev_port.c
93
- - ext/revdispatch/libdispatch-0.1/libev-3.31/ev_select.c
94
- - ext/revdispatch/libdispatch-0.1/libev-3.31/ev_vars.h
95
- - ext/revdispatch/libdispatch-0.1/libev-3.31/ev_win32.c
96
- - ext/revdispatch/libdispatch-0.1/libev-3.31/ev_wrap.h
97
- - ext/revdispatch/libdispatch-0.1/libev-3.31/event.c
98
- - ext/revdispatch/libdispatch-0.1/libev-3.31/event.h
99
- - ext/revdispatch/libdispatch-0.1/libev-3.31/Changes
100
- - ext/revdispatch/libdispatch-0.1/libev-3.31/LICENSE
101
- - ext/revdispatch/libdispatch-0.1/libev-3.31/Makefile.am
102
- - ext/revdispatch/libdispatch-0.1/libev-3.31/Makefile.in
103
- - ext/revdispatch/libdispatch-0.1/libev-3.31/README
104
- - ext/revdispatch/libdispatch-0.1/libev-3.31/aclocal.m4
105
- - ext/revdispatch/libdispatch-0.1/libev-3.31/autogen.sh
106
- - ext/revdispatch/libdispatch-0.1/libev-3.31/config.guess
107
- - ext/revdispatch/libdispatch-0.1/libev-3.31/config.h.in
108
- - ext/revdispatch/libdispatch-0.1/libev-3.31/config.sub
109
- - ext/revdispatch/libdispatch-0.1/libev-3.31/configure
110
- - ext/revdispatch/libdispatch-0.1/libev-3.31/configure.ac
111
- - ext/revdispatch/libdispatch-0.1/libev-3.31/ev.3
112
- - ext/revdispatch/libdispatch-0.1/libev-3.31/ev.pod
113
- - ext/revdispatch/libdispatch-0.1/libev-3.31/install-sh
114
- - ext/revdispatch/libdispatch-0.1/libev-3.31/libev.m4
115
- - ext/revdispatch/libdispatch-0.1/libev-3.31/ltmain.sh
116
- - ext/revdispatch/libdispatch-0.1/libev-3.31/missing
117
- - ext/revdispatch/libdispatch-0.1/libev-3.31/mkinstalldirs
118
- - ext/revdispatch/libdispatch-0.1/src/ev_dispatch.h
119
- - ext/revdispatch/libdispatch-0.1/src/ev_http.h
120
- - ext/revdispatch/libdispatch-0.1/src/Makefile.am
121
- - ext/revdispatch/libdispatch-0.1/src/Makefile.in
122
- - ext/revdispatch/libdispatch-0.1/src/ev_dispatch.cc
123
- - ext/revdispatch/libdispatch-0.1/src/ev_http.cc
124
- - ext/revdispatch/libdispatch-0.1/test/Makefile.am
125
- - ext/revdispatch/libdispatch-0.1/test/Makefile.in
126
- - ext/revdispatch/libdispatch-0.1/test/key_test.cc
127
- - ext/revdispatch/libdispatch-0.1/test/next_test.cc
128
- - ext/revdispatch/libdispatch-0.1/test/pipe_test.cc
129
- - ext/revdispatch/libdispatch-0.1/test/opt_test.cc
130
- - ext/revdispatch/libdispatch-0.1/test/post_test.cc
131
- - ext/revdispatch/libdispatch-0.1/test/stress_test.cc
68
+ - ext/revdispatch/libdispatch/
69
+ - ext/revdispatch/libdispatch/src/
70
+ - ext/revdispatch/libdispatch/libev-3.31/ev++.h
71
+ - ext/revdispatch/libdispatch/libev-3.31/ev.c
72
+ - ext/revdispatch/libdispatch/libev-3.31/ev.h
73
+ - ext/revdispatch/libdispatch/libev-3.31/ev_epoll.c
74
+ - ext/revdispatch/libdispatch/libev-3.31/ev_kqueue.c
75
+ - ext/revdispatch/libdispatch/libev-3.31/ev_poll.c
76
+ - ext/revdispatch/libdispatch/libev-3.31/ev_port.c
77
+ - ext/revdispatch/libdispatch/libev-3.31/ev_select.c
78
+ - ext/revdispatch/libdispatch/libev-3.31/ev_vars.h
79
+ - ext/revdispatch/libdispatch/libev-3.31/ev_win32.c
80
+ - ext/revdispatch/libdispatch/libev-3.31/ev_wrap.h
81
+ - ext/revdispatch/libdispatch/libev-3.31/event.c
82
+ - ext/revdispatch/libdispatch/libev-3.31/event.h
83
+ - ext/revdispatch/libdispatch/src/ev_dispatch.h
84
+ - ext/revdispatch/libdispatch/src/ev_http.h
85
+ - ext/revdispatch/libdispatch/src/ev_dispatch.cc
86
+ - ext/revdispatch/libdispatch/src/ev_http.cc
87
+ - ext/revdispatch/libdispatch/src/ev_embed.c
132
88
  has_rdoc: true
133
89
  homepage: http://evdispatch.rubyforge.org
134
90
  post_install_message: