Commit 2df885a
committed
Enable multiple SSL connections by using AXTLS fd
axTLS lets us pass in a "file descriptor" which is used only by our own
code and could be anything that fits into an int. We were passing in 0
all the time which means axtls would get confused if there were
multiple simultaneous connections.
Instead of 0, pass in (this), a pointer to our object, where we now have
a normal class variable io_ctx, in place of the single static s_io_ctx.
By doing so we guarantee multiple connections get unique multiple FDs,
and remove the need for any static tracking of the io_ctx array/map.1 parent f49df47 commit 2df885a
1 file changed
+9
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | 75 | | |
78 | 76 | | |
79 | 77 | | |
| |||
96 | 94 | | |
97 | 95 | | |
98 | 96 | | |
99 | | - | |
100 | | - | |
| 97 | + | |
| 98 | + | |
101 | 99 | | |
102 | 100 | | |
103 | 101 | | |
104 | 102 | | |
105 | | - | |
106 | | - | |
| 103 | + | |
| 104 | + | |
107 | 105 | | |
108 | 106 | | |
109 | 107 | | |
| |||
116 | 114 | | |
117 | 115 | | |
118 | 116 | | |
119 | | - | |
120 | | - | |
| 117 | + | |
| 118 | + | |
121 | 119 | | |
122 | 120 | | |
123 | 121 | | |
| |||
134 | 132 | | |
135 | 133 | | |
136 | 134 | | |
137 | | - | |
| 135 | + | |
138 | 136 | | |
139 | 137 | | |
140 | 138 | | |
| |||
244 | 242 | | |
245 | 243 | | |
246 | 244 | | |
247 | | - | |
248 | | - | |
| 245 | + | |
249 | 246 | | |
250 | 247 | | |
251 | 248 | | |
| |||
287 | 284 | | |
288 | 285 | | |
289 | 286 | | |
290 | | - | |
| 287 | + | |
291 | 288 | | |
292 | 289 | | |
293 | 290 | | |
294 | 291 | | |
295 | | - | |
296 | 292 | | |
297 | 293 | | |
298 | 294 | | |
| |||
0 commit comments