ffi-nats-core 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/ffi-nats-core.gemspec +8 -0
  3. data/lib/ffi/nats/core/version.rb +1 -1
  4. data/vendor/cnats/CMakeLists.txt +137 -0
  5. data/vendor/cnats/adapters/libevent.h +220 -0
  6. data/vendor/cnats/adapters/libuv.h +472 -0
  7. data/vendor/cnats/examples/CMakeLists.txt +56 -0
  8. data/vendor/cnats/examples/asynctimeout.c +83 -0
  9. data/vendor/cnats/examples/examples.h +322 -0
  10. data/vendor/cnats/examples/libevent-pub.c +136 -0
  11. data/vendor/cnats/examples/libevent-sub.c +104 -0
  12. data/vendor/cnats/examples/libuv-pub.c +120 -0
  13. data/vendor/cnats/examples/libuv-sub.c +114 -0
  14. data/vendor/cnats/examples/publisher.c +62 -0
  15. data/vendor/cnats/examples/queuegroup.c +132 -0
  16. data/vendor/cnats/examples/replier.c +149 -0
  17. data/vendor/cnats/examples/requestor.c +75 -0
  18. data/vendor/cnats/examples/subscriber.c +133 -0
  19. data/vendor/cnats/src/CMakeLists.txt +31 -0
  20. data/vendor/cnats/src/asynccb.c +66 -0
  21. data/vendor/cnats/src/asynccb.h +42 -0
  22. data/vendor/cnats/src/buf.c +246 -0
  23. data/vendor/cnats/src/buf.h +116 -0
  24. data/vendor/cnats/src/comsock.c +474 -0
  25. data/vendor/cnats/src/comsock.h +81 -0
  26. data/vendor/cnats/src/conn.c +2725 -0
  27. data/vendor/cnats/src/conn.h +75 -0
  28. data/vendor/cnats/src/err.h +31 -0
  29. data/vendor/cnats/src/gc.h +27 -0
  30. data/vendor/cnats/src/hash.c +725 -0
  31. data/vendor/cnats/src/hash.h +141 -0
  32. data/vendor/cnats/src/include/n-unix.h +56 -0
  33. data/vendor/cnats/src/include/n-win.h +59 -0
  34. data/vendor/cnats/src/mem.h +20 -0
  35. data/vendor/cnats/src/msg.c +155 -0
  36. data/vendor/cnats/src/msg.h +43 -0
  37. data/vendor/cnats/src/nats.c +1734 -0
  38. data/vendor/cnats/src/nats.h +2024 -0
  39. data/vendor/cnats/src/natsp.h +518 -0
  40. data/vendor/cnats/src/natstime.c +79 -0
  41. data/vendor/cnats/src/natstime.h +27 -0
  42. data/vendor/cnats/src/nuid.c +265 -0
  43. data/vendor/cnats/src/nuid.h +21 -0
  44. data/vendor/cnats/src/opts.c +1030 -0
  45. data/vendor/cnats/src/opts.h +19 -0
  46. data/vendor/cnats/src/parser.c +869 -0
  47. data/vendor/cnats/src/parser.h +87 -0
  48. data/vendor/cnats/src/pub.c +293 -0
  49. data/vendor/cnats/src/srvpool.c +380 -0
  50. data/vendor/cnats/src/srvpool.h +71 -0
  51. data/vendor/cnats/src/stats.c +54 -0
  52. data/vendor/cnats/src/stats.h +21 -0
  53. data/vendor/cnats/src/status.c +60 -0
  54. data/vendor/cnats/src/status.h +95 -0
  55. data/vendor/cnats/src/sub.c +956 -0
  56. data/vendor/cnats/src/sub.h +34 -0
  57. data/vendor/cnats/src/timer.c +86 -0
  58. data/vendor/cnats/src/timer.h +57 -0
  59. data/vendor/cnats/src/unix/cond.c +103 -0
  60. data/vendor/cnats/src/unix/mutex.c +107 -0
  61. data/vendor/cnats/src/unix/sock.c +105 -0
  62. data/vendor/cnats/src/unix/thread.c +162 -0
  63. data/vendor/cnats/src/url.c +134 -0
  64. data/vendor/cnats/src/url.h +24 -0
  65. data/vendor/cnats/src/util.c +823 -0
  66. data/vendor/cnats/src/util.h +75 -0
  67. data/vendor/cnats/src/version.h +29 -0
  68. data/vendor/cnats/src/version.h.in +29 -0
  69. data/vendor/cnats/src/win/cond.c +86 -0
  70. data/vendor/cnats/src/win/mutex.c +54 -0
  71. data/vendor/cnats/src/win/sock.c +158 -0
  72. data/vendor/cnats/src/win/strings.c +108 -0
  73. data/vendor/cnats/src/win/thread.c +180 -0
  74. data/vendor/cnats/test/CMakeLists.txt +35 -0
  75. data/vendor/cnats/test/certs/ca.pem +38 -0
  76. data/vendor/cnats/test/certs/client-cert.pem +30 -0
  77. data/vendor/cnats/test/certs/client-key.pem +51 -0
  78. data/vendor/cnats/test/certs/server-cert.pem +31 -0
  79. data/vendor/cnats/test/certs/server-key.pem +51 -0
  80. data/vendor/cnats/test/dylib/CMakeLists.txt +10 -0
  81. data/vendor/cnats/test/dylib/nonats.c +13 -0
  82. data/vendor/cnats/test/list.txt +125 -0
  83. data/vendor/cnats/test/test.c +11655 -0
  84. data/vendor/cnats/test/tls.conf +15 -0
  85. data/vendor/cnats/test/tlsverify.conf +19 -0
  86. metadata +83 -1
@@ -0,0 +1,180 @@
1
+ // Copyright 2015 Apcera Inc. All rights reserved.
2
+
3
+ #include "../natsp.h"
4
+
5
+ #include <process.h>
6
+
7
+ #include "../mem.h"
8
+
9
+ static BOOL CALLBACK
10
+ _initHandleFunction(PINIT_ONCE InitOnce, PVOID Parameter, PVOID *lpContext)
11
+ {
12
+ natsInitOnceCb cb = (natsInitOnceCb) Parameter;
13
+
14
+ (*cb)();
15
+
16
+ return TRUE;
17
+ }
18
+
19
+ bool
20
+ nats_InitOnce(natsInitOnceType *control, natsInitOnceCb cb)
21
+ {
22
+ BOOL bStatus;
23
+
24
+ // Execute the initialization callback function
25
+ bStatus = InitOnceExecuteOnce(control,
26
+ _initHandleFunction,
27
+ (PVOID) cb,
28
+ NULL);
29
+
30
+ // InitOnceExecuteOnce function succeeded.
31
+ if (bStatus)
32
+ return true;
33
+
34
+ return false;
35
+ }
36
+
37
+ struct threadCtx
38
+ {
39
+ natsThreadCb entry;
40
+ void *arg;
41
+ };
42
+
43
+ static unsigned __stdcall _threadStart(void* arg)
44
+ {
45
+ struct threadCtx *c = (struct threadCtx*) arg;
46
+
47
+ c->entry(c->arg);
48
+
49
+ NATS_FREE(c);
50
+
51
+ return 0;
52
+ }
53
+
54
+ natsStatus
55
+ natsThread_Create(natsThread **thread, natsThreadCb cb, void *arg)
56
+ {
57
+ struct threadCtx *ctx = NULL;
58
+ natsThread *t = NULL;
59
+ natsStatus s = NATS_OK;
60
+
61
+ ctx = (struct threadCtx*) NATS_CALLOC(1, sizeof(*ctx));
62
+ t = (natsThread*) NATS_CALLOC(1, sizeof(natsThread));
63
+
64
+ if ((ctx == NULL) || (t == NULL))
65
+ s = nats_setDefaultError(NATS_NO_MEMORY);
66
+
67
+ if (s == NATS_OK)
68
+ {
69
+ ctx->entry = cb;
70
+ ctx->arg = arg;
71
+
72
+ t->t = (HANDLE) _beginthreadex(NULL, 0, _threadStart, ctx, 0, NULL);
73
+ if (t->t == NULL)
74
+ s = nats_setError(NATS_SYS_ERROR,
75
+ "_beginthreadex error: %d",
76
+ GetLastError());
77
+ else
78
+ t->id = GetThreadId(t->t);
79
+ }
80
+ if (s == NATS_OK)
81
+ {
82
+ *thread = t;
83
+ }
84
+ else
85
+ {
86
+ NATS_FREE(ctx);
87
+ NATS_FREE(t);
88
+ }
89
+
90
+ return s;
91
+ }
92
+
93
+ void
94
+ natsThread_Join(natsThread *t)
95
+ {
96
+ if (GetCurrentThreadId() != t->id)
97
+ {
98
+ if (WaitForSingleObject(t->t, INFINITE))
99
+ abort();
100
+ }
101
+ }
102
+
103
+ void
104
+ natsThread_Detach(natsThread *t)
105
+ {
106
+ // nothing for now.
107
+ }
108
+
109
+ bool
110
+ natsThread_IsCurrent(natsThread *t)
111
+ {
112
+ if (GetCurrentThreadId() == t->id)
113
+ return true;
114
+
115
+ return false;
116
+ }
117
+
118
+ void
119
+ natsThread_Yield()
120
+ {
121
+ // The correct way would be to call the following function.
122
+ // However, it looks like the connection reconnect test
123
+ // is failing on Windows without a proper sleep (that is,
124
+ // even Sleep(0) does not help).
125
+ // SwitchToThread();
126
+ nats_Sleep(1);
127
+ }
128
+
129
+ void
130
+ natsThread_Destroy(natsThread *t)
131
+ {
132
+ if (t == NULL)
133
+ return;
134
+
135
+ CloseHandle(t->t);
136
+
137
+ NATS_FREE(t);
138
+ }
139
+
140
+ natsStatus
141
+ natsThreadLocal_CreateKey(natsThreadLocal *tl, void (*destructor)(void*))
142
+ {
143
+ if ((*tl = TlsAlloc()) == TLS_OUT_OF_INDEXES)
144
+ {
145
+ return nats_setError(NATS_SYS_ERROR,
146
+ "TlsAlloc error: %d",
147
+ GetLastError());
148
+ }
149
+
150
+ return NATS_OK;
151
+ }
152
+
153
+ void*
154
+ natsThreadLocal_Get(natsThreadLocal tl)
155
+ {
156
+ return (void*) TlsGetValue(tl);
157
+ }
158
+
159
+ natsStatus
160
+ natsThreadLocal_SetEx(natsThreadLocal tl, const void *value, bool setErr)
161
+ {
162
+ if (TlsSetValue(tl, (LPVOID) value) == 0)
163
+ {
164
+ if (setErr)
165
+ return nats_setError(NATS_SYS_ERROR,
166
+ "TlsSetValue error: %d",
167
+ GetLastError());
168
+ else
169
+ return NATS_SYS_ERROR;
170
+ }
171
+
172
+ return NATS_OK;
173
+ }
174
+
175
+ void
176
+ natsThreadLocal_DestroyKey(natsThreadLocal tl)
177
+ {
178
+ TlsFree(tl);
179
+ }
180
+
@@ -0,0 +1,35 @@
1
+ # We need this to build the test program
2
+ include_directories(${PROJECT_SOURCE_DIR}/src)
3
+ if(NATS_BUILD_WITH_TLS)
4
+ include_directories(${OPENSSL_INCLUDE_DIR})
5
+ endif(NATS_BUILD_WITH_TLS)
6
+
7
+ # Build the test program
8
+ add_executable(testsuite test.c)
9
+
10
+ # Link statically with the library
11
+ target_link_libraries(testsuite nats_static ${NATS_EXTRA_LIB})
12
+
13
+ # Set the test index to 0
14
+ set(testIndex 0)
15
+
16
+ # Read the file 'list.txt' to get all the test names
17
+ file(STRINGS list.txt listOfTestNames)
18
+
19
+ # For each test name
20
+ foreach(name ${listOfTestNames})
21
+
22
+ # Create a test and pass the index (start and end are the same)
23
+ # to the testsuite executable
24
+ add_test(NAME Test_${name}
25
+ WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
26
+ COMMAND testsuite ${testIndex} ${testIndex})
27
+
28
+ # Make sure the test passes
29
+ set_tests_properties(Test_${name} PROPERTIES PASS_REGULAR_EXPRESSION "ALL PASSED")
30
+
31
+ # Bump the test index number
32
+ math(EXPR testIndex "${testIndex}+1")
33
+ endforeach()
34
+
35
+
@@ -0,0 +1,38 @@
1
+ -----BEGIN CERTIFICATE-----
2
+ MIIGjzCCBHegAwIBAgIJAKT2W9SKY7o4MA0GCSqGSIb3DQEBCwUAMIGLMQswCQYD
3
+ VQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xEzAR
4
+ BgNVBAoTCkFwY2VyYSBJbmMxEDAOBgNVBAsTB25hdHMuaW8xEjAQBgNVBAMTCWxv
5
+ Y2FsaG9zdDEcMBoGCSqGSIb3DQEJARYNZGVyZWtAbmF0cy5pbzAeFw0xNTExMDUy
6
+ MzA2MTdaFw0xOTExMDQyMzA2MTdaMIGLMQswCQYDVQQGEwJVUzELMAkGA1UECBMC
7
+ Q0ExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xEzARBgNVBAoTCkFwY2VyYSBJbmMx
8
+ EDAOBgNVBAsTB25hdHMuaW8xEjAQBgNVBAMTCWxvY2FsaG9zdDEcMBoGCSqGSIb3
9
+ DQEJARYNZGVyZWtAbmF0cy5pbzCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC
10
+ ggIBAJOyBvFaREbmO/yaw8UD8u5vSk+Qrwdkfa0iHMo11nkcVtynHNKcgRUTkZBC
11
+ xEZILVsuPa+WSUcUc0ej0TmuimrtOjXGn+LD0TrDVz6dd6lBufLXjo1fbUnKUjml
12
+ TBYB2h7StDksrBPFnbEOVKN+qb1No4YxfvbJ6EK3xfnsm3dvamnetJugrmQ2EUlu
13
+ glPNZDIShu9Fcsiq2hjw+dJ2Erl8kx2/PE8nOdcDG9I4wAM71pw9L1dHGmMOnTsq
14
+ opLDVkMNjeIgMPxj5aIhvS8Tcnj16ZNi4h10587vld8fIdz+OgTDFMNi91PgZQmX
15
+ 9puXraBGi5UEn0ly57IIY+aFkx74jPWgnVYz8w8G+W2GTFYQE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+/dr4t4N7WMFDIvCc6WtdP8+YIFq1vAZuuWUKGbCIHwPbyGgbaY
43
+ yAaQsC6AgTRmOC/cJA2Kmk2h1tAl/YtjCONbPdtHRHXwSWA9Y1EYerWJl88/ezdS
44
+ 2NaGfbMPojR7VGtIMxSeR1JQTx/RSyOZYnqxp8nkljE0diU58YCAkv1niG5dBepT
45
+ NBdg/GvG80omgFxBic2PvUxb9KEVazCTLQKCAQEAwx3aNk2lMovLzuMRqj2O7rqs
46
+ 4usiHDllR1S7vAySUqhBaL8l+y1lsulgCDExClt3SQpsaM5xep1sK5jN8REzKsE9
47
+ xBgXkNRgy+/1VGa1Tx0DR6xLoAIYT7Ttm27kellAFLE1tEFsSdZP9ZcfwjYKQEuu
48
+ Bsm4zf5duDb+hLraxK9ISqcc8ZUSlCLkj9GdhLwf+/8C81LXkS2ScR8Edumn8qe7
49
+ IYqqWSYqKhaoqmx6sr8E0SIn6PKd7uXZnXTTxTf6AR1RNzFcStIL5lC06V6Savpa
50
+ tSX2voU3DgUIDYrYUhDweukR8i+0nrkR8wRUUjxaAeegUIRHN5ffpk57lQNaNg==
51
+ -----END RSA PRIVATE KEY-----
@@ -0,0 +1,10 @@
1
+ # We need this to build the test program
2
+ include_directories(${PROJECT_SOURCE_DIR}/src)
3
+
4
+ # Build the test program
5
+ add_executable(nonats nonats.c)
6
+
7
+ # Link dynamically with the library
8
+ add_definitions(-Dnats_IMPORTS)
9
+
10
+ target_link_libraries(nonats nats ${NATS_EXTRA_LIB})
@@ -0,0 +1,13 @@
1
+ // Copyright 2017 Apcera Inc. All rights reserved.
2
+
3
+ #include <nats.h>
4
+
5
+ int main(int argc, char **argv)
6
+ {
7
+ // Give a chance for the destructor/DllMain to be registered.
8
+ // Note that nats_Sleep() is not "opening" the library, so
9
+ // the cleanup code would still crash if we were not skipping
10
+ // the cleanup if we detect that library was never oepened.
11
+ nats_Sleep(1000);
12
+ return 0;
13
+ }