Commit 53fe063
Pass a copy of the control frame buffer to ping/pong callbacks (#116)
* Pass a copy of the control frame buffer to callbacks
* Add back old API
Since the new and old methods are only overloads and share the same name, the 'renamed' parameter of the deprecation warning doesn't help.
* Allow specifying payload when sending ping
* Remove default value in favor of method forwarding
This preserves the signature of the original method and doesn't break the API
* Apply suggestions from code review
New APIs should use safe code
---------
Co-authored-by: Tim Condon <0xTim@users.noreply.github.com>1 parent 2ec1450 commit 53fe063
File tree
3 files changed
+57
-14
lines changed- Sources/WebSocketKit
- Concurrency
- Tests/WebSocketKitTests
3 files changed
+57
-14
lines changedLines changed: 29 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
22 | 26 | | |
23 | | - | |
| 27 | + | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
| |||
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
63 | 78 | | |
64 | 79 | | |
65 | | - | |
| 80 | + | |
66 | 81 | | |
67 | 82 | | |
68 | 83 | | |
69 | 84 | | |
70 | 85 | | |
71 | 86 | | |
72 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
73 | 99 | | |
74 | 100 | | |
75 | | - | |
| 101 | + | |
76 | 102 | | |
77 | 103 | | |
78 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
| 37 | + | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
| 51 | + | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
72 | 77 | | |
73 | | - | |
| 78 | + | |
74 | 79 | | |
75 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
76 | 86 | | |
77 | 87 | | |
78 | 88 | | |
| |||
112 | 122 | | |
113 | 123 | | |
114 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
115 | 129 | | |
116 | | - | |
| 130 | + | |
117 | 131 | | |
118 | 132 | | |
119 | 133 | | |
| |||
236 | 250 | | |
237 | 251 | | |
238 | 252 | | |
239 | | - | |
| 253 | + | |
240 | 254 | | |
241 | 255 | | |
242 | 256 | | |
| |||
254 | 268 | | |
255 | 269 | | |
256 | 270 | | |
257 | | - | |
| 271 | + | |
258 | 272 | | |
259 | 273 | | |
260 | 274 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
| 137 | + | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
| |||
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
147 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
148 | 151 | | |
149 | 152 | | |
150 | 153 | | |
| |||
0 commit comments