opal-up 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/up_ext/App.h +665 -544
- data/ext/up_ext/AsyncSocket.h +307 -284
- data/ext/up_ext/AsyncSocketData.h +35 -51
- data/ext/up_ext/BloomFilter.h +37 -42
- data/ext/up_ext/ChunkedEncoding.h +174 -175
- data/ext/up_ext/ClientApp.h +20 -23
- data/ext/up_ext/HttpContext.h +476 -381
- data/ext/up_ext/HttpContextData.h +20 -20
- data/ext/up_ext/HttpErrors.h +14 -10
- data/ext/up_ext/HttpParser.h +631 -563
- data/ext/up_ext/HttpResponse.h +526 -460
- data/ext/up_ext/HttpResponseData.h +59 -55
- data/ext/up_ext/HttpRouter.h +328 -310
- data/ext/up_ext/Loop.h +174 -168
- data/ext/up_ext/LoopData.h +60 -67
- data/ext/up_ext/MoveOnlyFunction.h +71 -80
- data/ext/up_ext/PerMessageDeflate.h +218 -198
- data/ext/up_ext/ProxyParser.h +100 -99
- data/ext/up_ext/QueryParser.h +91 -84
- data/ext/up_ext/TopicTree.h +273 -268
- data/ext/up_ext/Utilities.h +25 -25
- data/ext/up_ext/WebSocket.h +376 -310
- data/ext/up_ext/WebSocketContext.h +487 -372
- data/ext/up_ext/WebSocketContextData.h +74 -62
- data/ext/up_ext/WebSocketData.h +53 -46
- data/ext/up_ext/WebSocketExtensions.h +194 -178
- data/ext/up_ext/WebSocketHandshake.h +115 -110
- data/ext/up_ext/WebSocketProtocol.h +441 -398
- data/ext/up_ext/up_ext.c +43 -5
- data/lib/up/ruby/cluster.rb +29 -6
- data/lib/up/version.rb +1 -1
- metadata +2 -2
data/ext/up_ext/Utilities.h
CHANGED
@@ -26,41 +26,41 @@ namespace uWS {
|
|
26
26
|
namespace utils {
|
27
27
|
|
28
28
|
inline int u32toaHex(uint32_t value, char *dst) {
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
29
|
+
char palette[] = "0123456789abcdef";
|
30
|
+
char temp[10];
|
31
|
+
char *p = temp;
|
32
|
+
do {
|
33
|
+
*p++ = palette[value & 15];
|
34
|
+
value >>= 4;
|
35
|
+
} while (value > 0);
|
36
36
|
|
37
|
-
|
37
|
+
int ret = (int)(p - temp);
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
39
|
+
do {
|
40
|
+
*dst++ = *--p;
|
41
|
+
} while (p != temp);
|
42
42
|
|
43
|
-
|
43
|
+
return ret;
|
44
44
|
}
|
45
45
|
|
46
46
|
inline int u64toa(uint64_t value, char *dst) {
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
47
|
+
char temp[20];
|
48
|
+
char *p = temp;
|
49
|
+
do {
|
50
|
+
*p++ = (char)((value % 10) + '0');
|
51
|
+
value /= 10;
|
52
|
+
} while (value > 0);
|
53
53
|
|
54
|
-
|
54
|
+
int ret = (int)(p - temp);
|
55
55
|
|
56
|
-
|
57
|
-
|
58
|
-
|
56
|
+
do {
|
57
|
+
*dst++ = *--p;
|
58
|
+
} while (p != temp);
|
59
59
|
|
60
|
-
|
60
|
+
return ret;
|
61
61
|
}
|
62
62
|
|
63
|
-
}
|
64
|
-
}
|
63
|
+
} // namespace utils
|
64
|
+
} // namespace uWS
|
65
65
|
|
66
66
|
#endif // UWS_UTILITIES_H
|