isomorfeus-iodine 0.7.49 → 0.7.50

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +1 -1
  3. data/CHANGELOG.md +17 -3
  4. data/Rakefile +1 -9
  5. data/examples/etag.ru +16 -0
  6. data/ext/{iodine → iodine_ext}/extconf.rb +1 -1
  7. data/ext/{iodine → iodine_ext}/fio.c +0 -0
  8. data/ext/{iodine → iodine_ext}/fio.h +0 -0
  9. data/ext/{iodine → iodine_ext}/fio_cli.c +0 -0
  10. data/ext/{iodine → iodine_ext}/fio_cli.h +189 -189
  11. data/ext/{iodine → iodine_ext}/fio_json_parser.h +687 -687
  12. data/ext/{iodine → iodine_ext}/fio_siphash.c +157 -157
  13. data/ext/{iodine → iodine_ext}/fio_siphash.h +37 -37
  14. data/ext/{iodine → iodine_ext}/fio_tls.h +129 -129
  15. data/ext/{iodine → iodine_ext}/fio_tls_missing.c +0 -0
  16. data/ext/{iodine → iodine_ext}/fio_tls_openssl.c +0 -0
  17. data/ext/{iodine → iodine_ext}/fio_tmpfile.h +0 -0
  18. data/ext/{iodine → iodine_ext}/fiobj.h +44 -44
  19. data/ext/{iodine → iodine_ext}/fiobj4fio.h +21 -21
  20. data/ext/{iodine → iodine_ext}/fiobj_ary.c +333 -333
  21. data/ext/{iodine → iodine_ext}/fiobj_ary.h +139 -139
  22. data/ext/{iodine → iodine_ext}/fiobj_data.c +0 -0
  23. data/ext/{iodine → iodine_ext}/fiobj_data.h +0 -0
  24. data/ext/{iodine → iodine_ext}/fiobj_hash.c +0 -0
  25. data/ext/{iodine → iodine_ext}/fiobj_hash.h +176 -176
  26. data/ext/{iodine → iodine_ext}/fiobj_json.c +622 -622
  27. data/ext/{iodine → iodine_ext}/fiobj_json.h +68 -68
  28. data/ext/{iodine → iodine_ext}/fiobj_mem.h +71 -71
  29. data/ext/{iodine → iodine_ext}/fiobj_mustache.c +0 -0
  30. data/ext/{iodine → iodine_ext}/fiobj_mustache.h +62 -62
  31. data/ext/{iodine → iodine_ext}/fiobj_numbers.c +0 -0
  32. data/ext/{iodine → iodine_ext}/fiobj_numbers.h +127 -127
  33. data/ext/{iodine → iodine_ext}/fiobj_str.c +0 -0
  34. data/ext/{iodine → iodine_ext}/fiobj_str.h +172 -172
  35. data/ext/{iodine → iodine_ext}/fiobject.c +0 -0
  36. data/ext/{iodine → iodine_ext}/fiobject.h +0 -0
  37. data/ext/{iodine → iodine_ext}/hpack.h +1923 -1923
  38. data/ext/{iodine → iodine_ext}/http.c +14 -27
  39. data/ext/{iodine → iodine_ext}/http.h +1002 -1002
  40. data/ext/{iodine → iodine_ext}/http1.c +0 -0
  41. data/ext/{iodine → iodine_ext}/http1.h +29 -29
  42. data/ext/{iodine → iodine_ext}/http1_parser.h +0 -0
  43. data/ext/{iodine → iodine_ext}/http_internal.c +0 -0
  44. data/ext/{iodine → iodine_ext}/http_internal.h +0 -0
  45. data/ext/{iodine → iodine_ext}/http_mime_parser.h +350 -350
  46. data/ext/{iodine → iodine_ext}/iodine.c +1 -1
  47. data/ext/{iodine → iodine_ext}/iodine.h +0 -0
  48. data/ext/{iodine → iodine_ext}/iodine_caller.c +0 -0
  49. data/ext/{iodine → iodine_ext}/iodine_caller.h +0 -0
  50. data/ext/{iodine → iodine_ext}/iodine_connection.c +0 -0
  51. data/ext/{iodine → iodine_ext}/iodine_connection.h +55 -55
  52. data/ext/{iodine → iodine_ext}/iodine_defer.c +0 -0
  53. data/ext/{iodine → iodine_ext}/iodine_defer.h +6 -6
  54. data/ext/{iodine → iodine_ext}/iodine_fiobj2rb.h +120 -120
  55. data/ext/{iodine → iodine_ext}/iodine_helpers.c +0 -0
  56. data/ext/{iodine → iodine_ext}/iodine_helpers.h +12 -12
  57. data/ext/{iodine → iodine_ext}/iodine_http.c +0 -2
  58. data/ext/{iodine → iodine_ext}/iodine_http.h +23 -23
  59. data/ext/{iodine → iodine_ext}/iodine_json.c +302 -302
  60. data/ext/{iodine → iodine_ext}/iodine_json.h +6 -6
  61. data/ext/{iodine → iodine_ext}/iodine_mustache.c +0 -0
  62. data/ext/{iodine → iodine_ext}/iodine_mustache.h +6 -6
  63. data/ext/{iodine → iodine_ext}/iodine_pubsub.c +0 -0
  64. data/ext/{iodine → iodine_ext}/iodine_pubsub.h +26 -26
  65. data/ext/{iodine → iodine_ext}/iodine_rack_io.c +0 -0
  66. data/ext/{iodine → iodine_ext}/iodine_rack_io.h +20 -20
  67. data/ext/{iodine → iodine_ext}/iodine_store.c +0 -0
  68. data/ext/{iodine → iodine_ext}/iodine_store.h +20 -20
  69. data/ext/{iodine → iodine_ext}/iodine_tcp.c +0 -0
  70. data/ext/{iodine → iodine_ext}/iodine_tcp.h +0 -0
  71. data/ext/{iodine → iodine_ext}/iodine_tls.c +0 -0
  72. data/ext/{iodine → iodine_ext}/iodine_tls.h +13 -13
  73. data/ext/{iodine → iodine_ext}/mustache_parser.h +0 -0
  74. data/ext/{iodine → iodine_ext}/redis_engine.c +0 -0
  75. data/ext/{iodine → iodine_ext}/redis_engine.h +0 -0
  76. data/ext/{iodine → iodine_ext}/resp_parser.h +0 -0
  77. data/ext/{iodine → iodine_ext}/websocket_parser.h +505 -505
  78. data/ext/{iodine → iodine_ext}/websockets.c +0 -0
  79. data/ext/{iodine → iodine_ext}/websockets.h +185 -185
  80. data/isomorfeus-iodine.gemspec +1 -2
  81. data/lib/iodine/version.rb +1 -1
  82. data/lib/iodine.rb +1 -1
  83. metadata +79 -78
@@ -1325,7 +1325,7 @@ Ruby loads the library and invokes the Init_<lib_name> function...
1325
1325
  Here we connect all the C code to the Ruby interface, completing the bridge
1326
1326
  between Lib-Server and Ruby.
1327
1327
  ***************************************************************************** */
1328
- void Init_iodine(void) {
1328
+ void Init_iodine_ext(void) {
1329
1329
  /* common Symbol objects in use by Iodine */
1330
1330
  #define IODINE_MAKE_SYM(name) \
1331
1331
  do { \
File without changes
File without changes
File without changes
File without changes
@@ -1,55 +1,55 @@
1
- #ifndef H_IODINE_CONNECTION_H
2
- #define H_IODINE_CONNECTION_H
3
-
4
- #include "iodine.h"
5
-
6
- typedef enum {
7
- IODINE_CONNECTION_RAW,
8
- IODINE_CONNECTION_WEBSOCKET,
9
- IODINE_CONNECTION_SSE
10
- } iodine_connection_type_e;
11
-
12
- typedef struct {
13
- iodine_connection_type_e type;
14
- intptr_t uuid;
15
- void *arg; /* holds the connection pointer (ws_s / sse_s) */
16
- VALUE handler;
17
- VALUE env;
18
- } iodine_connection_s;
19
-
20
- /**
21
- * Creates a new connection object.
22
- */
23
- VALUE iodine_connection_new(iodine_connection_s args);
24
- #define iodine_connection_new(...) \
25
- iodine_connection_new((iodine_connection_s){__VA_ARGS__})
26
-
27
- typedef enum {
28
- IODINE_CONNECTION_ON_OPEN,
29
- IODINE_CONNECTION_ON_MESSAGE,
30
- IODINE_CONNECTION_ON_DRAINED,
31
- IODINE_CONNECTION_PING,
32
- IODINE_CONNECTION_ON_SHUTDOWN,
33
- IODINE_CONNECTION_ON_CLOSE
34
- } iodine_connection_event_type_e;
35
-
36
- /**
37
- * Fires a connection object's event. `data` is only for the on_message event.
38
- */
39
- void iodine_connection_fire_event(VALUE connection,
40
- iodine_connection_event_type_e ev,
41
- VALUE data);
42
-
43
- /** Initializes the Connection Ruby class. */
44
- void iodine_connection_init(void);
45
-
46
- extern const rb_data_type_t iodine_connection_data_type;
47
-
48
- static inline iodine_connection_s *iodine_connection_CData(VALUE self) {
49
- iodine_connection_s *c = NULL;
50
- TypedData_Get_Struct(self, iodine_connection_s, &iodine_connection_data_type,
51
- c);
52
- return c;
53
- }
54
-
55
- #endif
1
+ #ifndef H_IODINE_CONNECTION_H
2
+ #define H_IODINE_CONNECTION_H
3
+
4
+ #include "iodine.h"
5
+
6
+ typedef enum {
7
+ IODINE_CONNECTION_RAW,
8
+ IODINE_CONNECTION_WEBSOCKET,
9
+ IODINE_CONNECTION_SSE
10
+ } iodine_connection_type_e;
11
+
12
+ typedef struct {
13
+ iodine_connection_type_e type;
14
+ intptr_t uuid;
15
+ void *arg; /* holds the connection pointer (ws_s / sse_s) */
16
+ VALUE handler;
17
+ VALUE env;
18
+ } iodine_connection_s;
19
+
20
+ /**
21
+ * Creates a new connection object.
22
+ */
23
+ VALUE iodine_connection_new(iodine_connection_s args);
24
+ #define iodine_connection_new(...) \
25
+ iodine_connection_new((iodine_connection_s){__VA_ARGS__})
26
+
27
+ typedef enum {
28
+ IODINE_CONNECTION_ON_OPEN,
29
+ IODINE_CONNECTION_ON_MESSAGE,
30
+ IODINE_CONNECTION_ON_DRAINED,
31
+ IODINE_CONNECTION_PING,
32
+ IODINE_CONNECTION_ON_SHUTDOWN,
33
+ IODINE_CONNECTION_ON_CLOSE
34
+ } iodine_connection_event_type_e;
35
+
36
+ /**
37
+ * Fires a connection object's event. `data` is only for the on_message event.
38
+ */
39
+ void iodine_connection_fire_event(VALUE connection,
40
+ iodine_connection_event_type_e ev,
41
+ VALUE data);
42
+
43
+ /** Initializes the Connection Ruby class. */
44
+ void iodine_connection_init(void);
45
+
46
+ extern const rb_data_type_t iodine_connection_data_type;
47
+
48
+ static inline iodine_connection_s *iodine_connection_CData(VALUE self) {
49
+ iodine_connection_s *c = NULL;
50
+ TypedData_Get_Struct(self, iodine_connection_s, &iodine_connection_data_type,
51
+ c);
52
+ return c;
53
+ }
54
+
55
+ #endif
File without changes
@@ -1,6 +1,6 @@
1
- #ifndef H_IODINE_DEFER_H
2
- #define H_IODINE_DEFER_H
3
-
4
- void iodine_defer_initialize(void);
5
-
6
- #endif
1
+ #ifndef H_IODINE_DEFER_H
2
+ #define H_IODINE_DEFER_H
3
+
4
+ void iodine_defer_initialize(void);
5
+
6
+ #endif
@@ -1,120 +1,120 @@
1
- #ifndef H_RB_FIOBJ2RUBY_H
2
- /*
3
- Copyright: Boaz segev, 2016-2017
4
- License: MIT
5
-
6
- Feel free to copy, use and enjoy according to the license provided.
7
- */
8
- #define H_RB_FIOBJ2RUBY_H
9
- #include <fiobj.h>
10
- #include <ruby.h>
11
-
12
- #include "iodine_store.h"
13
-
14
- typedef struct {
15
- FIOBJ stack;
16
- uintptr_t count;
17
- VALUE rb;
18
- uint8_t str2sym;
19
- } fiobj2rb_s;
20
-
21
- typedef struct {
22
- uint8_t str2sym;
23
- } fiobj2rb_settings_s;
24
-
25
- static inline VALUE fiobj2rb(FIOBJ o, uint8_t str2sym) {
26
- VALUE rb;
27
- if (!o)
28
- return Qnil;
29
- switch (FIOBJ_TYPE(o)) {
30
- case FIOBJ_T_NUMBER:
31
- rb = LONG2FIX(fiobj_obj2num(o));
32
- break;
33
- case FIOBJ_T_TRUE:
34
- rb = Qtrue;
35
- break;
36
- case FIOBJ_T_FALSE:
37
- rb = Qfalse;
38
- break;
39
- case FIOBJ_T_FLOAT:
40
- rb = rb_float_new(fiobj_obj2float(o));
41
- break;
42
- case FIOBJ_T_DATA: /* fallthrough */
43
- case FIOBJ_T_UNKNOWN: /* fallthrough */
44
- case FIOBJ_T_STRING: {
45
- fio_str_info_s tmp = fiobj_obj2cstr(o);
46
- if (str2sym) {
47
- rb = rb_intern2(tmp.data, tmp.len);
48
- rb = ID2SYM(rb);
49
- } else {
50
- rb = rb_str_new(tmp.data, tmp.len);
51
- }
52
-
53
- } break;
54
- case FIOBJ_T_ARRAY:
55
- rb = rb_ary_new();
56
- break;
57
- case FIOBJ_T_HASH:
58
- rb = rb_hash_new();
59
- break;
60
- case FIOBJ_T_NULL: /* fallthrough */
61
- default:
62
- rb = Qnil;
63
- break;
64
- };
65
- return rb;
66
- }
67
-
68
- static int fiobj2rb_task(FIOBJ o, void *data_) {
69
- fiobj2rb_s *data = data_;
70
- VALUE rb_tmp;
71
- rb_tmp = fiobj2rb(o, 0);
72
- IodineStore.add(rb_tmp);
73
- if (data->rb) {
74
- if (RB_TYPE_P(data->rb, T_HASH)) {
75
- rb_hash_aset(data->rb, fiobj2rb(fiobj_hash_key_in_loop(), data->str2sym),
76
- rb_tmp);
77
- } else {
78
- rb_ary_push(data->rb, rb_tmp);
79
- }
80
- --(data->count);
81
- IodineStore.remove(rb_tmp);
82
- } else {
83
- data->rb = rb_tmp;
84
- // IodineStore.add(rb_tmp);
85
- }
86
- if (FIOBJ_TYPE_IS(o, FIOBJ_T_ARRAY)) {
87
- fiobj_ary_push(data->stack, (FIOBJ)data->count);
88
- fiobj_ary_push(data->stack, (FIOBJ)data->rb);
89
- data->count = fiobj_ary_count(o);
90
- data->rb = rb_tmp;
91
- } else if (FIOBJ_TYPE_IS(o, FIOBJ_T_HASH)) {
92
- fiobj_ary_push(data->stack, (FIOBJ)data->count);
93
- fiobj_ary_push(data->stack, (FIOBJ)data->rb);
94
- data->count = fiobj_hash_count(o);
95
- data->rb = rb_tmp;
96
- }
97
- while (data->count == 0 && fiobj_ary_count(data->stack)) {
98
- data->rb = fiobj_ary_pop(data->stack);
99
- data->count = fiobj_ary_pop(data->stack);
100
- }
101
- return 0;
102
- }
103
-
104
- static inline VALUE fiobj2rb_deep(FIOBJ obj, uint8_t str2sym) {
105
- fiobj2rb_s data = {.stack = fiobj_ary_new2(4), .str2sym = str2sym};
106
-
107
- /* deep copy */
108
- fiobj_each2(obj, fiobj2rb_task, &data);
109
- /* cleanup (shouldn't happen, but what the hell)... */
110
- while (fiobj_ary_pop(data.stack))
111
- ;
112
- fiobj_free(data.stack);
113
- // IodineStore.remove(data.rb); // don't remove data
114
- return data.rb;
115
- }
116
-
117
- // require 'iodine'
118
- // Iodine::JSON.parse "{\"1\":[1,2,3,4]}"
119
- // Iodine::JSON.parse IO.binread("")
120
- #endif /* H_RB_FIOBJ2RUBY_H */
1
+ #ifndef H_RB_FIOBJ2RUBY_H
2
+ /*
3
+ Copyright: Boaz segev, 2016-2017
4
+ License: MIT
5
+
6
+ Feel free to copy, use and enjoy according to the license provided.
7
+ */
8
+ #define H_RB_FIOBJ2RUBY_H
9
+ #include <fiobj.h>
10
+ #include <ruby.h>
11
+
12
+ #include "iodine_store.h"
13
+
14
+ typedef struct {
15
+ FIOBJ stack;
16
+ uintptr_t count;
17
+ VALUE rb;
18
+ uint8_t str2sym;
19
+ } fiobj2rb_s;
20
+
21
+ typedef struct {
22
+ uint8_t str2sym;
23
+ } fiobj2rb_settings_s;
24
+
25
+ static inline VALUE fiobj2rb(FIOBJ o, uint8_t str2sym) {
26
+ VALUE rb;
27
+ if (!o)
28
+ return Qnil;
29
+ switch (FIOBJ_TYPE(o)) {
30
+ case FIOBJ_T_NUMBER:
31
+ rb = LONG2FIX(fiobj_obj2num(o));
32
+ break;
33
+ case FIOBJ_T_TRUE:
34
+ rb = Qtrue;
35
+ break;
36
+ case FIOBJ_T_FALSE:
37
+ rb = Qfalse;
38
+ break;
39
+ case FIOBJ_T_FLOAT:
40
+ rb = rb_float_new(fiobj_obj2float(o));
41
+ break;
42
+ case FIOBJ_T_DATA: /* fallthrough */
43
+ case FIOBJ_T_UNKNOWN: /* fallthrough */
44
+ case FIOBJ_T_STRING: {
45
+ fio_str_info_s tmp = fiobj_obj2cstr(o);
46
+ if (str2sym) {
47
+ rb = rb_intern2(tmp.data, tmp.len);
48
+ rb = ID2SYM(rb);
49
+ } else {
50
+ rb = rb_str_new(tmp.data, tmp.len);
51
+ }
52
+
53
+ } break;
54
+ case FIOBJ_T_ARRAY:
55
+ rb = rb_ary_new();
56
+ break;
57
+ case FIOBJ_T_HASH:
58
+ rb = rb_hash_new();
59
+ break;
60
+ case FIOBJ_T_NULL: /* fallthrough */
61
+ default:
62
+ rb = Qnil;
63
+ break;
64
+ };
65
+ return rb;
66
+ }
67
+
68
+ static int fiobj2rb_task(FIOBJ o, void *data_) {
69
+ fiobj2rb_s *data = data_;
70
+ VALUE rb_tmp;
71
+ rb_tmp = fiobj2rb(o, 0);
72
+ IodineStore.add(rb_tmp);
73
+ if (data->rb) {
74
+ if (RB_TYPE_P(data->rb, T_HASH)) {
75
+ rb_hash_aset(data->rb, fiobj2rb(fiobj_hash_key_in_loop(), data->str2sym),
76
+ rb_tmp);
77
+ } else {
78
+ rb_ary_push(data->rb, rb_tmp);
79
+ }
80
+ --(data->count);
81
+ IodineStore.remove(rb_tmp);
82
+ } else {
83
+ data->rb = rb_tmp;
84
+ // IodineStore.add(rb_tmp);
85
+ }
86
+ if (FIOBJ_TYPE_IS(o, FIOBJ_T_ARRAY)) {
87
+ fiobj_ary_push(data->stack, (FIOBJ)data->count);
88
+ fiobj_ary_push(data->stack, (FIOBJ)data->rb);
89
+ data->count = fiobj_ary_count(o);
90
+ data->rb = rb_tmp;
91
+ } else if (FIOBJ_TYPE_IS(o, FIOBJ_T_HASH)) {
92
+ fiobj_ary_push(data->stack, (FIOBJ)data->count);
93
+ fiobj_ary_push(data->stack, (FIOBJ)data->rb);
94
+ data->count = fiobj_hash_count(o);
95
+ data->rb = rb_tmp;
96
+ }
97
+ while (data->count == 0 && fiobj_ary_count(data->stack)) {
98
+ data->rb = fiobj_ary_pop(data->stack);
99
+ data->count = fiobj_ary_pop(data->stack);
100
+ }
101
+ return 0;
102
+ }
103
+
104
+ static inline VALUE fiobj2rb_deep(FIOBJ obj, uint8_t str2sym) {
105
+ fiobj2rb_s data = {.stack = fiobj_ary_new2(4), .str2sym = str2sym};
106
+
107
+ /* deep copy */
108
+ fiobj_each2(obj, fiobj2rb_task, &data);
109
+ /* cleanup (shouldn't happen, but what the hell)... */
110
+ while (fiobj_ary_pop(data.stack))
111
+ ;
112
+ fiobj_free(data.stack);
113
+ // IodineStore.remove(data.rb); // don't remove data
114
+ return data.rb;
115
+ }
116
+
117
+ // require 'iodine'
118
+ // Iodine::JSON.parse "{\"1\":[1,2,3,4]}"
119
+ // Iodine::JSON.parse IO.binread("")
120
+ #endif /* H_RB_FIOBJ2RUBY_H */
File without changes
@@ -1,12 +1,12 @@
1
- #ifndef H_IODINE_HELPERS_H
2
- #define H_IODINE_HELPERS_H
3
- /*
4
- Copyright: Boaz segev, 2016-2018
5
- License: MIT
6
-
7
- Feel free to copy, use and enjoy according to the license provided.
8
- */
9
-
10
- void iodine_init_helpers(void);
11
-
12
- #endif
1
+ #ifndef H_IODINE_HELPERS_H
2
+ #define H_IODINE_HELPERS_H
3
+ /*
4
+ Copyright: Boaz segev, 2016-2018
5
+ License: MIT
6
+
7
+ Feel free to copy, use and enjoy according to the license provided.
8
+ */
9
+
10
+ void iodine_init_helpers(void);
11
+
12
+ #endif
@@ -369,7 +369,6 @@ static inline VALUE copy2env(iodine_http_request_handle_s *handle) {
369
369
  if (*pos == 0) {
370
370
  rb_hash_aset(env, SERVER_NAME,
371
371
  rb_enc_str_new(tmp.data, tmp.len, IodineBinaryEncoding));
372
- rb_hash_aset(env, SERVER_PORT, QUERY_ESTRING);
373
372
  } else {
374
373
  rb_hash_aset(
375
374
  env, SERVER_NAME,
@@ -870,7 +869,6 @@ static void initialize_env_template(void) {
870
869
  rb_hash_aset(env_template_no_upgrade, REMOTE_ADDR, QUERY_STRING);
871
870
  rb_hash_aset(env_template_no_upgrade, REQUEST_METHOD, QUERY_STRING);
872
871
  rb_hash_aset(env_template_no_upgrade, SERVER_NAME, QUERY_STRING);
873
- rb_hash_aset(env_template_no_upgrade, SERVER_PORT, QUERY_ESTRING);
874
872
  rb_hash_aset(env_template_no_upgrade, SERVER_PROTOCOL, QUERY_STRING);
875
873
 
876
874
  /* WebSocket upgrade support */
@@ -1,23 +1,23 @@
1
- #ifndef H_IODINE_HTTP_H
2
- #define H_IODINE_HTTP_H
3
- /*
4
- Copyright: Boaz segev, 2016-2018
5
- License: MIT
6
-
7
- Feel free to copy, use and enjoy according to the license provided.
8
- */
9
- #include "iodine.h"
10
-
11
- /* these three are used also by rb-rack-io.c */
12
- extern VALUE IODINE_R_INPUT;
13
- extern VALUE IODINE_R_INPUT_DEFAULT;
14
- extern VALUE IODINE_R_HIJACK;
15
- extern VALUE IODINE_R_HIJACK_IO;
16
- extern VALUE IODINE_R_HIJACK_CB;
17
- void iodine_init_http(void);
18
-
19
- intptr_t iodine_http_listen(iodine_connection_args_s args);
20
- // intptr_t iodine_http_connect(iodine_connection_args_s args); // not yet...
21
- intptr_t iodine_ws_connect(iodine_connection_args_s args);
22
-
23
- #endif
1
+ #ifndef H_IODINE_HTTP_H
2
+ #define H_IODINE_HTTP_H
3
+ /*
4
+ Copyright: Boaz segev, 2016-2018
5
+ License: MIT
6
+
7
+ Feel free to copy, use and enjoy according to the license provided.
8
+ */
9
+ #include "iodine.h"
10
+
11
+ /* these three are used also by rb-rack-io.c */
12
+ extern VALUE IODINE_R_INPUT;
13
+ extern VALUE IODINE_R_INPUT_DEFAULT;
14
+ extern VALUE IODINE_R_HIJACK;
15
+ extern VALUE IODINE_R_HIJACK_IO;
16
+ extern VALUE IODINE_R_HIJACK_CB;
17
+ void iodine_init_http(void);
18
+
19
+ intptr_t iodine_http_listen(iodine_connection_args_s args);
20
+ // intptr_t iodine_http_connect(iodine_connection_args_s args); // not yet...
21
+ intptr_t iodine_ws_connect(iodine_connection_args_s args);
22
+
23
+ #endif