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
@@ -1,44 +1,44 @@
1
- /*
2
- Copyright: Boaz Segev, 2017-2019
3
- License: MIT
4
- */
5
- #ifndef H_FIOBJ_H
6
- #define H_FIOBJ_H
7
-
8
- #include <fiobj_ary.h>
9
- #include <fiobj_data.h>
10
- #include <fiobj_hash.h>
11
- #include <fiobj_json.h>
12
- #include <fiobj_mustache.h>
13
- #include <fiobj_numbers.h>
14
- #include <fiobj_str.h>
15
- #include <fiobject.h>
16
-
17
- #include <fio_siphash.h>
18
-
19
- #ifdef H_FACIL_IO_H
20
- #include <fiobj4fio.h>
21
- #endif
22
-
23
- #if DEBUG
24
- FIO_INLINE void fiobj_test(void) {
25
- fprintf(stderr, "\n=== FIOBJ Tests ===\n\n");
26
- fiobj_test_string();
27
- fiobj_test_numbers();
28
- fiobj_test_array();
29
- fiobj_test_hash();
30
- fiobj_test_core();
31
- fiobj_data_test();
32
- fiobj_test_json();
33
- fiobj_mustache_test();
34
- fiobj_siphash_test();
35
- fprintf(stderr, "=== FIOBJ Done ===\n\n");
36
- }
37
- #else
38
- FIO_INLINE void fiobj_test(void) {
39
- fprintf(stderr, "ERROR: tesing functions only defined with DEBUG=1\n");
40
- exit(-1);
41
- }
42
- #endif
43
- #undef FIO_INLINE
44
- #endif
1
+ /*
2
+ Copyright: Boaz Segev, 2017-2019
3
+ License: MIT
4
+ */
5
+ #ifndef H_FIOBJ_H
6
+ #define H_FIOBJ_H
7
+
8
+ #include <fiobj_ary.h>
9
+ #include <fiobj_data.h>
10
+ #include <fiobj_hash.h>
11
+ #include <fiobj_json.h>
12
+ #include <fiobj_mustache.h>
13
+ #include <fiobj_numbers.h>
14
+ #include <fiobj_str.h>
15
+ #include <fiobject.h>
16
+
17
+ #include <fio_siphash.h>
18
+
19
+ #ifdef H_FACIL_IO_H
20
+ #include <fiobj4fio.h>
21
+ #endif
22
+
23
+ #if DEBUG
24
+ FIO_INLINE void fiobj_test(void) {
25
+ fprintf(stderr, "\n=== FIOBJ Tests ===\n\n");
26
+ fiobj_test_string();
27
+ fiobj_test_numbers();
28
+ fiobj_test_array();
29
+ fiobj_test_hash();
30
+ fiobj_test_core();
31
+ fiobj_data_test();
32
+ fiobj_test_json();
33
+ fiobj_mustache_test();
34
+ fiobj_siphash_test();
35
+ fprintf(stderr, "=== FIOBJ Done ===\n\n");
36
+ }
37
+ #else
38
+ FIO_INLINE void fiobj_test(void) {
39
+ fprintf(stderr, "ERROR: tesing functions only defined with DEBUG=1\n");
40
+ exit(-1);
41
+ }
42
+ #endif
43
+ #undef FIO_INLINE
44
+ #endif
@@ -1,21 +1,21 @@
1
- #ifndef H_FIOBJ4SOCK_H
2
- #define H_FIOBJ4SOCK_H
3
- /**
4
- * Defines a helper for using fiobj with the sock library.
5
- */
6
-
7
- #include <fio.h>
8
- #include <fiobj.h>
9
-
10
- static void fiobj4sock_dealloc(void *o) { fiobj_free((FIOBJ)o); }
11
-
12
- /** send a FIOBJ object through a socket. */
13
- static inline __attribute__((unused)) ssize_t fiobj_send_free(intptr_t uuid,
14
- FIOBJ o) {
15
- fio_str_info_s s = fiobj_obj2cstr(o);
16
- return fio_write2(uuid, .data.buffer = (void *)(o),
17
- .offset = (uintptr_t)(((intptr_t)s.data) - ((intptr_t)(o))),
18
- .length = s.len, .after.dealloc = fiobj4sock_dealloc);
19
- }
20
-
21
- #endif
1
+ #ifndef H_FIOBJ4SOCK_H
2
+ #define H_FIOBJ4SOCK_H
3
+ /**
4
+ * Defines a helper for using fiobj with the sock library.
5
+ */
6
+
7
+ #include <fio.h>
8
+ #include <fiobj.h>
9
+
10
+ static void fiobj4sock_dealloc(void *o) { fiobj_free((FIOBJ)o); }
11
+
12
+ /** send a FIOBJ object through a socket. */
13
+ static inline __attribute__((unused)) ssize_t fiobj_send_free(intptr_t uuid,
14
+ FIOBJ o) {
15
+ fio_str_info_s s = fiobj_obj2cstr(o);
16
+ return fio_write2(uuid, .data.buffer = (void *)(o),
17
+ .offset = (uintptr_t)(((intptr_t)s.data) - ((intptr_t)(o))),
18
+ .length = s.len, .after.dealloc = fiobj4sock_dealloc);
19
+ }
20
+
21
+ #endif