Commit 337d202
feat(tcp-connector): expose TcpListener::accept_on and cover the pooled N=2 path
The Embassy loopback concurrency test used two unrelated `TcpListener<1>` on
different ports, so it never touched `with_buffers` construction or same-port
fan-out. Rework it to stand up one `TcpListener::<2>::with_buffers(...)` on a
single port and dial it with two clients.
Reaching the N>1 pool from an integration test required a public accept: the
`Listener` impl is `N=1`-only and the pooled path (`into_server_futures`/
`serve_socket_slot`) was private, reachable only through `TcpServer<N>` + the
AimX session engine. Add `TcpListener::<N>::accept_on(index)` and factor the
accept body — previously duplicated between the `N=1` `Listener` impl and the
server workers — into a shared `accept_on_slot`. Side benefit: `with_buffers`
can now be driven directly instead of only through `TcpServer`.
Addresses review feedback on #179.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 83df852 commit 337d202
2 files changed
Lines changed: 97 additions & 52 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
295 | 312 | | |
296 | 313 | | |
297 | 314 | | |
| |||
316 | 333 | | |
317 | 334 | | |
318 | 335 | | |
319 | | - | |
320 | | - | |
321 | | - | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
322 | 354 | | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
338 | 363 | | |
339 | 364 | | |
340 | 365 | | |
| |||
346 | 371 | | |
347 | 372 | | |
348 | 373 | | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
366 | 378 | | |
367 | 379 | | |
368 | 380 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
| 10 | + | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
204 | 228 | | |
205 | 229 | | |
206 | 230 | | |
| |||
228 | 252 | | |
229 | 253 | | |
230 | 254 | | |
231 | | - | |
232 | | - | |
233 | | - | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
234 | 262 | | |
235 | 263 | | |
236 | 264 | | |
237 | | - | |
238 | | - | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
239 | 268 | | |
240 | | - | |
| 269 | + | |
241 | 270 | | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
246 | 276 | | |
247 | | - | |
248 | 277 | | |
249 | 278 | | |
250 | | - | |
| 279 | + | |
| 280 | + | |
251 | 281 | | |
252 | | - | |
253 | 282 | | |
254 | 283 | | |
| 284 | + | |
| 285 | + | |
255 | 286 | | |
256 | | - | |
257 | | - | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
258 | 291 | | |
259 | 292 | | |
260 | 293 | | |
| |||
0 commit comments