evdispatch 0.1.5 → 0.2.0

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.
@@ -1,8 +1,8 @@
1
- # Makefile.in generated by automake 1.10 from Makefile.am.
1
+ # Makefile.in generated by automake 1.9.6 from Makefile.am.
2
2
  # @configure_input@
3
3
 
4
4
  # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5
- # 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
5
+ # 2003, 2004, 2005 Free Software Foundation, Inc.
6
6
  # This Makefile.in is free software; the Free Software Foundation
7
7
  # gives unlimited permission to copy and/or distribute it,
8
8
  # with or without modifications, as long as this notice is preserved.
@@ -14,11 +14,15 @@
14
14
 
15
15
  @SET_MAKE@
16
16
 
17
+ srcdir = @srcdir@
18
+ top_srcdir = @top_srcdir@
17
19
  VPATH = @srcdir@
18
20
  pkgdatadir = $(datadir)/@PACKAGE@
19
21
  pkglibdir = $(libdir)/@PACKAGE@
20
22
  pkgincludedir = $(includedir)/@PACKAGE@
23
+ top_builddir = ..
21
24
  am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
25
+ INSTALL = @INSTALL@
22
26
  install_sh_DATA = $(install_sh) -c -m 644
23
27
  install_sh_PROGRAM = $(install_sh) -c
24
28
  install_sh_SCRIPT = $(install_sh) -c
@@ -32,7 +36,8 @@ PRE_UNINSTALL = :
32
36
  POST_UNINSTALL = :
33
37
  build_triplet = @build@
34
38
  host_triplet = @host@
35
- bin_PROGRAMS = next_test$(EXEEXT) key_test$(EXEEXT) pipe_test$(EXEEXT)
39
+ bin_PROGRAMS = next_test$(EXEEXT) key_test$(EXEEXT) pipe_test$(EXEEXT) \
40
+ opt_test$(EXEEXT)
36
41
  subdir = test
37
42
  DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
38
43
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -49,41 +54,36 @@ PROGRAMS = $(bin_PROGRAMS)
49
54
  am_key_test_OBJECTS = key_test-key_test.$(OBJEXT)
50
55
  key_test_OBJECTS = $(am_key_test_OBJECTS)
51
56
  key_test_DEPENDENCIES =
52
- key_test_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
53
- $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
54
- $(CXXFLAGS) $(key_test_LDFLAGS) $(LDFLAGS) -o $@
55
57
  am_next_test_OBJECTS = next_test-next_test.$(OBJEXT)
56
58
  next_test_OBJECTS = $(am_next_test_OBJECTS)
57
59
  next_test_DEPENDENCIES =
58
- next_test_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
59
- $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
60
- $(CXXFLAGS) $(next_test_LDFLAGS) $(LDFLAGS) -o $@
60
+ am_opt_test_OBJECTS = opt_test-opt_test.$(OBJEXT)
61
+ opt_test_OBJECTS = $(am_opt_test_OBJECTS)
62
+ opt_test_DEPENDENCIES =
61
63
  am_pipe_test_OBJECTS = pipe_test-pipe_test.$(OBJEXT)
62
64
  pipe_test_OBJECTS = $(am_pipe_test_OBJECTS)
63
65
  pipe_test_DEPENDENCIES =
64
- pipe_test_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
65
- $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
66
- $(CXXFLAGS) $(pipe_test_LDFLAGS) $(LDFLAGS) -o $@
67
- DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
66
+ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
68
67
  depcomp = $(SHELL) $(top_srcdir)/depcomp
69
68
  am__depfiles_maybe = depfiles
70
69
  CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
71
70
  $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
72
- LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
73
- --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
74
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
71
+ LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
72
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
73
+ $(AM_CXXFLAGS) $(CXXFLAGS)
75
74
  CXXLD = $(CXX)
76
- CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
77
- --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
78
- $(LDFLAGS) -o $@
79
- SOURCES = $(key_test_SOURCES) $(next_test_SOURCES) \
75
+ CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
76
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
77
+ SOURCES = $(key_test_SOURCES) $(next_test_SOURCES) $(opt_test_SOURCES) \
80
78
  $(pipe_test_SOURCES)
81
79
  DIST_SOURCES = $(key_test_SOURCES) $(next_test_SOURCES) \
82
- $(pipe_test_SOURCES)
80
+ $(opt_test_SOURCES) $(pipe_test_SOURCES)
83
81
  ETAGS = etags
84
82
  CTAGS = ctags
85
83
  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
86
84
  ACLOCAL = @ACLOCAL@
85
+ AMDEP_FALSE = @AMDEP_FALSE@
86
+ AMDEP_TRUE = @AMDEP_TRUE@
87
87
  AMTAR = @AMTAR@
88
88
  AR = @AR@
89
89
  AUTOCONF = @AUTOCONF@
@@ -110,8 +110,6 @@ EGREP = @EGREP@
110
110
  EXEEXT = @EXEEXT@
111
111
  F77 = @F77@
112
112
  FFLAGS = @FFLAGS@
113
- GREP = @GREP@
114
- INSTALL = @INSTALL@
115
113
  INSTALL_DATA = @INSTALL_DATA@
116
114
  INSTALL_PROGRAM = @INSTALL_PROGRAM@
117
115
  INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -124,8 +122,9 @@ LIBTOOL = @LIBTOOL@
124
122
  LN_S = @LN_S@
125
123
  LTLIBOBJS = @LTLIBOBJS@
126
124
  MAINT = @MAINT@
125
+ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
126
+ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
127
127
  MAKEINFO = @MAKEINFO@
128
- MKDIR_P = @MKDIR_P@
129
128
  OBJEXT = @OBJEXT@
130
129
  PACKAGE = @PACKAGE@
131
130
  PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -135,18 +134,20 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
135
134
  PACKAGE_VERSION = @PACKAGE_VERSION@
136
135
  PATH_SEPARATOR = @PATH_SEPARATOR@
137
136
  RANLIB = @RANLIB@
138
- SED = @SED@
139
137
  SET_MAKE = @SET_MAKE@
140
138
  SHELL = @SHELL@
141
139
  STRIP = @STRIP@
142
140
  VERSION = @VERSION@
143
- abs_builddir = @abs_builddir@
144
- abs_srcdir = @abs_srcdir@
145
- abs_top_builddir = @abs_top_builddir@
146
- abs_top_srcdir = @abs_top_srcdir@
141
+ ac_ct_AR = @ac_ct_AR@
147
142
  ac_ct_CC = @ac_ct_CC@
148
143
  ac_ct_CXX = @ac_ct_CXX@
149
144
  ac_ct_F77 = @ac_ct_F77@
145
+ ac_ct_RANLIB = @ac_ct_RANLIB@
146
+ ac_ct_STRIP = @ac_ct_STRIP@
147
+ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
148
+ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
149
+ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
150
+ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
150
151
  am__include = @am__include@
151
152
  am__leading_dot = @am__leading_dot@
152
153
  am__quote = @am__quote@
@@ -158,39 +159,28 @@ build_alias = @build_alias@
158
159
  build_cpu = @build_cpu@
159
160
  build_os = @build_os@
160
161
  build_vendor = @build_vendor@
161
- builddir = @builddir@
162
162
  datadir = @datadir@
163
- datarootdir = @datarootdir@
164
- docdir = @docdir@
165
- dvidir = @dvidir@
166
163
  exec_prefix = @exec_prefix@
167
164
  host = @host@
168
165
  host_alias = @host_alias@
169
166
  host_cpu = @host_cpu@
170
167
  host_os = @host_os@
171
168
  host_vendor = @host_vendor@
172
- htmldir = @htmldir@
173
169
  includedir = @includedir@
174
170
  infodir = @infodir@
175
171
  install_sh = @install_sh@
176
172
  libdir = @libdir@
177
173
  libexecdir = @libexecdir@
178
- localedir = @localedir@
179
174
  localstatedir = @localstatedir@
180
175
  mandir = @mandir@
181
176
  mkdir_p = @mkdir_p@
182
177
  oldincludedir = @oldincludedir@
183
- pdfdir = @pdfdir@
184
178
  prefix = @prefix@
185
179
  program_transform_name = @program_transform_name@
186
- psdir = @psdir@
187
180
  sbindir = @sbindir@
188
181
  sharedstatedir = @sharedstatedir@
189
- srcdir = @srcdir@
190
182
  sysconfdir = @sysconfdir@
191
183
  target_alias = @target_alias@
192
- top_builddir = @top_builddir@
193
- top_srcdir = @top_srcdir@
194
184
  next_test_SOURCES = next_test.cc
195
185
  next_test_CPPFLAGS = -I$(top_srcdir)/src/ -I$(LIBEV_PATH)
196
186
  next_test_LDADD = -ldispatch -lev
@@ -203,6 +193,10 @@ pipe_test_SOURCES = pipe_test.cc
203
193
  pipe_test_CPPFLAGS = -I$(top_srcdir)/src/ -I$(LIBEV_PATH)
204
194
  pipe_test_LDADD = -ldispatch -lev
205
195
  pipe_test_LDFLAGS = -L$(top_srcdir)/src/.libs/ `curl-config --libs` -L$(LIBEV_PATH)/.libs/
196
+ opt_test_SOURCES = opt_test.cc
197
+ opt_test_CPPFLAGS = -I$(top_srcdir)/src/ -I$(LIBEV_PATH)
198
+ opt_test_LDADD = -ldispatch -lev
199
+ opt_test_LDFLAGS = -L$(top_srcdir)/src/.libs/ `curl-config --libs` -L$(LIBEV_PATH)/.libs/
206
200
  all: all-am
207
201
 
208
202
  .SUFFIXES:
@@ -238,7 +232,7 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
238
232
  cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
239
233
  install-binPROGRAMS: $(bin_PROGRAMS)
240
234
  @$(NORMAL_INSTALL)
241
- test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
235
+ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
242
236
  @list='$(bin_PROGRAMS)'; for p in $$list; do \
243
237
  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
244
238
  if test -f $$p \
@@ -266,13 +260,16 @@ clean-binPROGRAMS:
266
260
  done
267
261
  key_test$(EXEEXT): $(key_test_OBJECTS) $(key_test_DEPENDENCIES)
268
262
  @rm -f key_test$(EXEEXT)
269
- $(key_test_LINK) $(key_test_OBJECTS) $(key_test_LDADD) $(LIBS)
263
+ $(CXXLINK) $(key_test_LDFLAGS) $(key_test_OBJECTS) $(key_test_LDADD) $(LIBS)
270
264
  next_test$(EXEEXT): $(next_test_OBJECTS) $(next_test_DEPENDENCIES)
271
265
  @rm -f next_test$(EXEEXT)
272
- $(next_test_LINK) $(next_test_OBJECTS) $(next_test_LDADD) $(LIBS)
266
+ $(CXXLINK) $(next_test_LDFLAGS) $(next_test_OBJECTS) $(next_test_LDADD) $(LIBS)
267
+ opt_test$(EXEEXT): $(opt_test_OBJECTS) $(opt_test_DEPENDENCIES)
268
+ @rm -f opt_test$(EXEEXT)
269
+ $(CXXLINK) $(opt_test_LDFLAGS) $(opt_test_OBJECTS) $(opt_test_LDADD) $(LIBS)
273
270
  pipe_test$(EXEEXT): $(pipe_test_OBJECTS) $(pipe_test_DEPENDENCIES)
274
271
  @rm -f pipe_test$(EXEEXT)
275
- $(pipe_test_LINK) $(pipe_test_OBJECTS) $(pipe_test_LDADD) $(LIBS)
272
+ $(CXXLINK) $(pipe_test_LDFLAGS) $(pipe_test_OBJECTS) $(pipe_test_LDADD) $(LIBS)
276
273
 
277
274
  mostlyclean-compile:
278
275
  -rm -f *.$(OBJEXT)
@@ -282,67 +279,82 @@ distclean-compile:
282
279
 
283
280
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/key_test-key_test.Po@am__quote@
284
281
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/next_test-next_test.Po@am__quote@
282
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opt_test-opt_test.Po@am__quote@
285
283
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe_test-pipe_test.Po@am__quote@
286
284
 
287
285
  .cc.o:
288
- @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
289
- @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
286
+ @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
287
+ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
290
288
  @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
291
289
  @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
292
290
  @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
293
291
 
294
292
  .cc.obj:
295
- @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
296
- @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
293
+ @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
294
+ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
297
295
  @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
298
296
  @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
299
297
  @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
300
298
 
301
299
  .cc.lo:
302
- @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
303
- @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
300
+ @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
301
+ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
304
302
  @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
305
303
  @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
306
304
  @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
307
305
 
308
306
  key_test-key_test.o: key_test.cc
309
- @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(key_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT key_test-key_test.o -MD -MP -MF $(DEPDIR)/key_test-key_test.Tpo -c -o key_test-key_test.o `test -f 'key_test.cc' || echo '$(srcdir)/'`key_test.cc
310
- @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/key_test-key_test.Tpo $(DEPDIR)/key_test-key_test.Po
307
+ @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(key_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT key_test-key_test.o -MD -MP -MF "$(DEPDIR)/key_test-key_test.Tpo" -c -o key_test-key_test.o `test -f 'key_test.cc' || echo '$(srcdir)/'`key_test.cc; \
308
+ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/key_test-key_test.Tpo" "$(DEPDIR)/key_test-key_test.Po"; else rm -f "$(DEPDIR)/key_test-key_test.Tpo"; exit 1; fi
311
309
  @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='key_test.cc' object='key_test-key_test.o' libtool=no @AMDEPBACKSLASH@
312
310
  @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
313
311
  @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(key_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o key_test-key_test.o `test -f 'key_test.cc' || echo '$(srcdir)/'`key_test.cc
314
312
 
315
313
  key_test-key_test.obj: key_test.cc
316
- @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(key_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT key_test-key_test.obj -MD -MP -MF $(DEPDIR)/key_test-key_test.Tpo -c -o key_test-key_test.obj `if test -f 'key_test.cc'; then $(CYGPATH_W) 'key_test.cc'; else $(CYGPATH_W) '$(srcdir)/key_test.cc'; fi`
317
- @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/key_test-key_test.Tpo $(DEPDIR)/key_test-key_test.Po
314
+ @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(key_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT key_test-key_test.obj -MD -MP -MF "$(DEPDIR)/key_test-key_test.Tpo" -c -o key_test-key_test.obj `if test -f 'key_test.cc'; then $(CYGPATH_W) 'key_test.cc'; else $(CYGPATH_W) '$(srcdir)/key_test.cc'; fi`; \
315
+ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/key_test-key_test.Tpo" "$(DEPDIR)/key_test-key_test.Po"; else rm -f "$(DEPDIR)/key_test-key_test.Tpo"; exit 1; fi
318
316
  @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='key_test.cc' object='key_test-key_test.obj' libtool=no @AMDEPBACKSLASH@
319
317
  @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
320
318
  @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(key_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o key_test-key_test.obj `if test -f 'key_test.cc'; then $(CYGPATH_W) 'key_test.cc'; else $(CYGPATH_W) '$(srcdir)/key_test.cc'; fi`
321
319
 
322
320
  next_test-next_test.o: next_test.cc
323
- @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(next_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT next_test-next_test.o -MD -MP -MF $(DEPDIR)/next_test-next_test.Tpo -c -o next_test-next_test.o `test -f 'next_test.cc' || echo '$(srcdir)/'`next_test.cc
324
- @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/next_test-next_test.Tpo $(DEPDIR)/next_test-next_test.Po
321
+ @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(next_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT next_test-next_test.o -MD -MP -MF "$(DEPDIR)/next_test-next_test.Tpo" -c -o next_test-next_test.o `test -f 'next_test.cc' || echo '$(srcdir)/'`next_test.cc; \
322
+ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/next_test-next_test.Tpo" "$(DEPDIR)/next_test-next_test.Po"; else rm -f "$(DEPDIR)/next_test-next_test.Tpo"; exit 1; fi
325
323
  @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='next_test.cc' object='next_test-next_test.o' libtool=no @AMDEPBACKSLASH@
326
324
  @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
327
325
  @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(next_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o next_test-next_test.o `test -f 'next_test.cc' || echo '$(srcdir)/'`next_test.cc
328
326
 
329
327
  next_test-next_test.obj: next_test.cc
330
- @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(next_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT next_test-next_test.obj -MD -MP -MF $(DEPDIR)/next_test-next_test.Tpo -c -o next_test-next_test.obj `if test -f 'next_test.cc'; then $(CYGPATH_W) 'next_test.cc'; else $(CYGPATH_W) '$(srcdir)/next_test.cc'; fi`
331
- @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/next_test-next_test.Tpo $(DEPDIR)/next_test-next_test.Po
328
+ @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(next_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT next_test-next_test.obj -MD -MP -MF "$(DEPDIR)/next_test-next_test.Tpo" -c -o next_test-next_test.obj `if test -f 'next_test.cc'; then $(CYGPATH_W) 'next_test.cc'; else $(CYGPATH_W) '$(srcdir)/next_test.cc'; fi`; \
329
+ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/next_test-next_test.Tpo" "$(DEPDIR)/next_test-next_test.Po"; else rm -f "$(DEPDIR)/next_test-next_test.Tpo"; exit 1; fi
332
330
  @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='next_test.cc' object='next_test-next_test.obj' libtool=no @AMDEPBACKSLASH@
333
331
  @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
334
332
  @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(next_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o next_test-next_test.obj `if test -f 'next_test.cc'; then $(CYGPATH_W) 'next_test.cc'; else $(CYGPATH_W) '$(srcdir)/next_test.cc'; fi`
335
333
 
334
+ opt_test-opt_test.o: opt_test.cc
335
+ @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opt_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT opt_test-opt_test.o -MD -MP -MF "$(DEPDIR)/opt_test-opt_test.Tpo" -c -o opt_test-opt_test.o `test -f 'opt_test.cc' || echo '$(srcdir)/'`opt_test.cc; \
336
+ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/opt_test-opt_test.Tpo" "$(DEPDIR)/opt_test-opt_test.Po"; else rm -f "$(DEPDIR)/opt_test-opt_test.Tpo"; exit 1; fi
337
+ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='opt_test.cc' object='opt_test-opt_test.o' libtool=no @AMDEPBACKSLASH@
338
+ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
339
+ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opt_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o opt_test-opt_test.o `test -f 'opt_test.cc' || echo '$(srcdir)/'`opt_test.cc
340
+
341
+ opt_test-opt_test.obj: opt_test.cc
342
+ @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opt_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT opt_test-opt_test.obj -MD -MP -MF "$(DEPDIR)/opt_test-opt_test.Tpo" -c -o opt_test-opt_test.obj `if test -f 'opt_test.cc'; then $(CYGPATH_W) 'opt_test.cc'; else $(CYGPATH_W) '$(srcdir)/opt_test.cc'; fi`; \
343
+ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/opt_test-opt_test.Tpo" "$(DEPDIR)/opt_test-opt_test.Po"; else rm -f "$(DEPDIR)/opt_test-opt_test.Tpo"; exit 1; fi
344
+ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='opt_test.cc' object='opt_test-opt_test.obj' libtool=no @AMDEPBACKSLASH@
345
+ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
346
+ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(opt_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o opt_test-opt_test.obj `if test -f 'opt_test.cc'; then $(CYGPATH_W) 'opt_test.cc'; else $(CYGPATH_W) '$(srcdir)/opt_test.cc'; fi`
347
+
336
348
  pipe_test-pipe_test.o: pipe_test.cc
337
- @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pipe_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT pipe_test-pipe_test.o -MD -MP -MF $(DEPDIR)/pipe_test-pipe_test.Tpo -c -o pipe_test-pipe_test.o `test -f 'pipe_test.cc' || echo '$(srcdir)/'`pipe_test.cc
338
- @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/pipe_test-pipe_test.Tpo $(DEPDIR)/pipe_test-pipe_test.Po
349
+ @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pipe_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT pipe_test-pipe_test.o -MD -MP -MF "$(DEPDIR)/pipe_test-pipe_test.Tpo" -c -o pipe_test-pipe_test.o `test -f 'pipe_test.cc' || echo '$(srcdir)/'`pipe_test.cc; \
350
+ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/pipe_test-pipe_test.Tpo" "$(DEPDIR)/pipe_test-pipe_test.Po"; else rm -f "$(DEPDIR)/pipe_test-pipe_test.Tpo"; exit 1; fi
339
351
  @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pipe_test.cc' object='pipe_test-pipe_test.o' libtool=no @AMDEPBACKSLASH@
340
352
  @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
341
353
  @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pipe_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o pipe_test-pipe_test.o `test -f 'pipe_test.cc' || echo '$(srcdir)/'`pipe_test.cc
342
354
 
343
355
  pipe_test-pipe_test.obj: pipe_test.cc
344
- @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pipe_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT pipe_test-pipe_test.obj -MD -MP -MF $(DEPDIR)/pipe_test-pipe_test.Tpo -c -o pipe_test-pipe_test.obj `if test -f 'pipe_test.cc'; then $(CYGPATH_W) 'pipe_test.cc'; else $(CYGPATH_W) '$(srcdir)/pipe_test.cc'; fi`
345
- @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/pipe_test-pipe_test.Tpo $(DEPDIR)/pipe_test-pipe_test.Po
356
+ @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pipe_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT pipe_test-pipe_test.obj -MD -MP -MF "$(DEPDIR)/pipe_test-pipe_test.Tpo" -c -o pipe_test-pipe_test.obj `if test -f 'pipe_test.cc'; then $(CYGPATH_W) 'pipe_test.cc'; else $(CYGPATH_W) '$(srcdir)/pipe_test.cc'; fi`; \
357
+ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/pipe_test-pipe_test.Tpo" "$(DEPDIR)/pipe_test-pipe_test.Po"; else rm -f "$(DEPDIR)/pipe_test-pipe_test.Tpo"; exit 1; fi
346
358
  @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pipe_test.cc' object='pipe_test-pipe_test.obj' libtool=no @AMDEPBACKSLASH@
347
359
  @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
348
360
  @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pipe_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o pipe_test-pipe_test.obj `if test -f 'pipe_test.cc'; then $(CYGPATH_W) 'pipe_test.cc'; else $(CYGPATH_W) '$(srcdir)/pipe_test.cc'; fi`
@@ -353,6 +365,10 @@ mostlyclean-libtool:
353
365
  clean-libtool:
354
366
  -rm -rf .libs _libs
355
367
 
368
+ distclean-libtool:
369
+ -rm -f libtool
370
+ uninstall-info-am:
371
+
356
372
  ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
357
373
  list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
358
374
  unique=`for i in $$list; do \
@@ -402,21 +418,22 @@ distclean-tags:
402
418
  -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
403
419
 
404
420
  distdir: $(DISTFILES)
405
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
406
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
407
- list='$(DISTFILES)'; \
408
- dist_files=`for file in $$list; do echo $$file; done | \
409
- sed -e "s|^$$srcdirstrip/||;t" \
410
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
411
- case $$dist_files in \
412
- */*) $(MKDIR_P) `echo "$$dist_files" | \
413
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
414
- sort -u` ;; \
415
- esac; \
416
- for file in $$dist_files; do \
421
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
422
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
423
+ list='$(DISTFILES)'; for file in $$list; do \
424
+ case $$file in \
425
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
426
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
427
+ esac; \
417
428
  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
429
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
430
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
431
+ dir="/$$dir"; \
432
+ $(mkdir_p) "$(distdir)$$dir"; \
433
+ else \
434
+ dir=''; \
435
+ fi; \
418
436
  if test -d $$d/$$file; then \
419
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
420
437
  if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
421
438
  cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
422
439
  fi; \
@@ -432,7 +449,7 @@ check: check-am
432
449
  all-am: Makefile $(PROGRAMS)
433
450
  installdirs:
434
451
  for dir in "$(DESTDIR)$(bindir)"; do \
435
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
452
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
436
453
  done
437
454
  install: install-am
438
455
  install-exec: install-exec-am
@@ -466,7 +483,7 @@ distclean: distclean-am
466
483
  -rm -rf ./$(DEPDIR)
467
484
  -rm -f Makefile
468
485
  distclean-am: clean-am distclean-compile distclean-generic \
469
- distclean-tags
486
+ distclean-libtool distclean-tags
470
487
 
471
488
  dvi: dvi-am
472
489
 
@@ -480,20 +497,12 @@ info-am:
480
497
 
481
498
  install-data-am:
482
499
 
483
- install-dvi: install-dvi-am
484
-
485
500
  install-exec-am: install-binPROGRAMS
486
501
 
487
- install-html: install-html-am
488
-
489
502
  install-info: install-info-am
490
503
 
491
504
  install-man:
492
505
 
493
- install-pdf: install-pdf-am
494
-
495
- install-ps: install-ps-am
496
-
497
506
  installcheck-am:
498
507
 
499
508
  maintainer-clean: maintainer-clean-am
@@ -514,23 +523,19 @@ ps: ps-am
514
523
 
515
524
  ps-am:
516
525
 
517
- uninstall-am: uninstall-binPROGRAMS
518
-
519
- .MAKE: install-am install-strip
526
+ uninstall-am: uninstall-binPROGRAMS uninstall-info-am
520
527
 
521
528
  .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
522
529
  clean-generic clean-libtool ctags distclean distclean-compile \
523
530
  distclean-generic distclean-libtool distclean-tags distdir dvi \
524
531
  dvi-am html html-am info info-am install install-am \
525
- install-binPROGRAMS install-data install-data-am install-dvi \
526
- install-dvi-am install-exec install-exec-am install-html \
527
- install-html-am install-info install-info-am install-man \
528
- install-pdf install-pdf-am install-ps install-ps-am \
532
+ install-binPROGRAMS install-data install-data-am install-exec \
533
+ install-exec-am install-info install-info-am install-man \
529
534
  install-strip installcheck installcheck-am installdirs \
530
535
  maintainer-clean maintainer-clean-generic mostlyclean \
531
536
  mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
532
537
  pdf pdf-am ps ps-am tags uninstall uninstall-am \
533
- uninstall-binPROGRAMS
538
+ uninstall-binPROGRAMS uninstall-info-am
534
539
 
535
540
  # Tell versions [3.59,3.63) of GNU make to not export all variables.
536
541
  # Otherwise a system limit (for SysV at least) may be exceeded.
@@ -13,7 +13,8 @@ static void SIGINT_handler(int sig)
13
13
 
14
14
  static void run_tests( Dispatch &dispatcher, int count )
15
15
  {
16
- time_t start_time = time(NULL);
16
+ struct timeval start_time;
17
+ Timer::current_time(&start_time);
17
18
  int response_count = 0;
18
19
 
19
20
  dispatcher.request( new HttpRequest( dispatcher, "http://127.0.0.1:4044/bytes/10200/" ) );
@@ -35,7 +36,7 @@ static void run_tests( Dispatch &dispatcher, int count )
35
36
  if( longest_request < rep->response_time ){
36
37
  longest_request = rep->response_time;
37
38
  }
38
- printf( "recieved response(%d): from '%s', Content-Length: %d bytes, within: %.2f seconds \n", rep->id, rep->name.c_str(), rep->body.length(), rep->response_time );
39
+ printf( "recieved response(%d): from '%s', Content-Length: %d bytes, within: %.5lf seconds \n", rep->id, rep->name.c_str(), rep->body.length(), rep->response_time );
39
40
  ++response_count;
40
41
  delete rep;
41
42
  --expected_response_count;
@@ -44,8 +45,8 @@ static void run_tests( Dispatch &dispatcher, int count )
44
45
  if( expected_response_count != 0 ){
45
46
  printf( "Expected: %d responses but recieved: %d\n", expected_response_count, response_count );
46
47
  }
47
- printf( "%d responses completed, within %.2f seconds\n", response_count, difftime( time(NULL), start_time ) );
48
- printf( "longest request: %.2f\n", longest_request );
48
+ printf( "%d responses completed, within %.5lf seconds\n", response_count, Timer::elapsed_time( &start_time ) );
49
+ printf( "longest request: %.5lf\n", longest_request );
49
50
  }
50
51
 
51
52
  int main(int argc, char **argv)
@@ -64,14 +65,15 @@ int main(int argc, char **argv)
64
65
 
65
66
  printf( "dispatcher thread running...\n" );
66
67
 
67
- time_t start_time = time(NULL);
68
+ struct timeval start_time;
69
+ Timer::current_time(&start_time);
68
70
 
69
71
  run_tests( dispatcher, 10 );
70
72
  run_tests( dispatcher, 10 );
71
73
  run_tests( dispatcher, 10 );
72
74
  run_tests( dispatcher, 10 );
73
75
 
74
- printf( "total time: %.2f seconds\n", difftime( time(NULL), start_time ) );
76
+ printf( "total time: %.5lf seconds\n", Timer::elapsed_time( &start_time ) );
75
77
 
76
78
  dispatcher.stop();
77
79
 
@@ -19,12 +19,12 @@
19
19
  * require 'rev_dispatch'
20
20
  *
21
21
  * # create a new dispatch loop
22
- * d = Rev::Dispatch::Loop.new
22
+ * d = Evdispatch::Loop.new
23
23
  *
24
24
  * # start the event loop thread
25
25
  *
26
26
  * # send a dispatch http request and store a handle to the request
27
- * google_id = d.request("get", "http://www.google.com/")
27
+ * google_id = d.request_http("http://www.google.com/")
28
28
  *
29
29
  * # do some processing and later on check for the response
30
30
  * while d.wait_for_response( google_id, 1, 0 )
@@ -33,7 +33,7 @@
33
33
  * end
34
34
  * res = d.response_for( google_id ) unless res
35
35
  *
36
- * puts res.inspect # array of response values
36
+ * puts res[:body]
37
37
  *
38
38
  * # sometime later you can stop the event loop
39
39
  * d.stop
@@ -44,6 +44,9 @@
44
44
  * background and happily wait for new requests using a minimal amount of cpu while waiting.
45
45
  * Everything in the background thread is written in C++ and has absolutely no hooks back into ruby.
46
46
  * The results of the work being processed in the background can be retrieved by ruby but that is it.
47
+ *
48
+ * the request method can be used passing it options will set specific libcurl options
49
+ *
47
50
  */
48
51
  static VALUE rb_Evdispatch;
49
52
  static VALUE rb_Loop;
@@ -70,6 +73,46 @@ VALUE Loop_request_http( VALUE self, VALUE url )
70
73
  return rb_int_new(id);
71
74
  }
72
75
 
76
+ #define SET_LONG_VAL(name)\
77
+ {\
78
+ VALUE obj = rb_hash_aref( options, ID2SYM(rb_intern(name)) ); \
79
+ if( !NIL_P(obj) ) {\
80
+ snprintf( VALUE_BUFFER, VALUE_BUFFER_SIZE, "%d", FIX2LONG(obj) );\
81
+ req->set_opt(name, VALUE_BUFFER);\
82
+ }\
83
+ }
84
+
85
+ #define SET_STR_VAL(name)\
86
+ {\
87
+ VALUE obj = rb_hash_aref( options, ID2SYM(rb_intern(name)) ); \
88
+ if( !NIL_P(obj) ) {\
89
+ req->set_opt(name, RSTRING_PTR(obj));\
90
+ }\
91
+ }
92
+
93
+ static
94
+ VALUE Loop_request( VALUE self, VALUE url, VALUE options )
95
+ {
96
+ EVD::Dispatch *d;
97
+ const int VALUE_BUFFER_SIZE = 1024;
98
+ char VALUE_BUFFER[VALUE_BUFFER_SIZE];
99
+ Data_Get_Struct( self, EVD::Dispatch, d );
100
+
101
+
102
+ EVD::HttpRequest *req = new EVD::HttpRequest( *d, RSTRING_PTR(url) );
103
+
104
+ // check for some specific options
105
+ SET_LONG_VAL("port");
106
+ SET_STR_VAL("autoreferer");
107
+ SET_LONG_VAL("followlocation");
108
+ SET_LONG_VAL("maxredirs");
109
+ SET_STR_VAL("referer");
110
+ SET_STR_VAL("useragent");
111
+ SET_STR_VAL("cookie");
112
+
113
+ return rb_int_new( d->request(req) );
114
+ }
115
+
73
116
  static
74
117
  VALUE Loop_wait_for_response( VALUE self, VALUE id, VALUE timeout_seconds, VALUE timeout_mseconds )
75
118
  {
@@ -90,10 +133,10 @@ VALUE Loop_response_for( VALUE self, VALUE id )
90
133
  EVD::Dispatch *d;
91
134
  Data_Get_Struct( self, EVD::Dispatch, d );
92
135
 
93
- EVD::Response *res = NULL;
136
+ EVD::HttpResponse *res = NULL;
94
137
  EVD::request_t rid = FIX2LONG(id);
95
138
 
96
- res = d->response_for( rid );
139
+ res = (EVD::HttpResponse*)d->response_for( rid );
97
140
  if( res ){
98
141
 
99
142
  VALUE result = rb_hash_new();
@@ -102,6 +145,7 @@ VALUE Loop_response_for( VALUE self, VALUE id )
102
145
  rb_hash_aset( result, ID2SYM(rb_intern("body")), rb_str_new( res->body.c_str(), res->body.length() ) );
103
146
  rb_hash_aset( result, ID2SYM(rb_intern("id")), rb_int_new( res->id ) );
104
147
  rb_hash_aset( result, ID2SYM(rb_intern("response_time")), rb_float_new( res->response_time ) );
148
+ rb_hash_aset( result, ID2SYM(rb_intern("header")), rb_str_new( res->m_header.c_str(), res->m_header.length() ) );
105
149
 
106
150
  delete res;
107
151
 
@@ -142,10 +186,12 @@ extern "C" void Init_revdispatch()
142
186
  rb_Evdispatch = rb_define_module( "Evdispatch" );
143
187
  rb_Loop = rb_define_class_under( rb_Evdispatch, "Loop", rb_cObject );
144
188
 
189
+ // setup the Loop object
145
190
  rb_define_alloc_func( rb_Loop, Loop_alloc );
146
191
 
147
192
  rb_define_method( rb_Loop, "start", (VALUE (*)(...))Loop_start, 0 );
148
193
  rb_define_method( rb_Loop, "request_http", (VALUE (*)(...))Loop_request_http, 1 );
194
+ rb_define_method( rb_Loop, "request", (VALUE (*)(...))Loop_request, 2 );
149
195
  rb_define_method( rb_Loop, "response_for", (VALUE (*)(...))Loop_response_for, 1 );
150
196
  rb_define_method( rb_Loop, "wait_for_response", (VALUE (*)(...))Loop_wait_for_response, 3 );
151
197
  rb_define_method( rb_Loop, "stop", (VALUE (*)(...))Loop_stop, 0 );
@@ -9,6 +9,7 @@ TEST_PORT = 4044
9
9
  class HelperApp
10
10
  def call(env)
11
11
  commands = env['PATH_INFO'].split('/')
12
+ extras = {}
12
13
 
13
14
  if commands.include?('delay')
14
15
  n = commands.last.to_i
@@ -22,7 +23,17 @@ class HelperApp
22
23
  raise "bytes called with n <= 0" if n <= 0
23
24
  body = "C"*n
24
25
  status = 200
25
-
26
+ elsif commands.include?('redir')
27
+ n = commands.last.to_i
28
+ if n <= 0
29
+ extras = {'Location' => '/bytes/10'}
30
+ body = "redirect to bytes"
31
+ else
32
+ extras = {'Location' => "/redir/#{n-1}"}
33
+ body = "redirect to redir #{n-1}"
34
+ end
35
+ puts body
36
+ status = 302
26
37
  elsif commands.include?('test_post_length')
27
38
  input_body = env['rack.input'].read
28
39
 
@@ -41,7 +52,7 @@ class HelperApp
41
52
  body = "Undefined url"
42
53
  end
43
54
 
44
- [status, {'Content-Type' => 'text/json'}, body]
55
+ [status, {'Content-Type' => 'text/json'}.merge(extras), body]
45
56
  end
46
57
  end
47
58
 
@@ -5,6 +5,7 @@ require 'revdispatch'
5
5
  pid = nil
6
6
  running_ebb_here = (ARGV[0] != 'r' and !`uname`.grep(/darwin/i))
7
7
  if running_ebb_here
8
+ puts "starting ebb in this process"
8
9
  pid = fork do
9
10
  require 'server'
10
11
  start_test_server
@@ -1,8 +1,8 @@
1
1
  module Evdispatch #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
- MINOR = 1
5
- TINY = 5
4
+ MINOR = 2
5
+ TINY = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end