Commit 7417f97
viosock: Enhance file transfer support in viosocklib-test
Improve viosocklib-test to handle large file transfers efficiently:
- Increase buffer size from 4KB to 64KB for better performance
- Replace single recv() call with streaming loop until connection close
- Add proper file creation with CREATE_ALWAYS flag
- Remove automatic "OK" response for ncat --vsock compatibility
- Add progress reporting during file transfer
- Enhance error handling and user feedback
This enables reliable file transfers from Linux hosts using ncat --vsock
without size limitations imposed by the previous 4KB buffer constraint.
Signed-off-by: Leidong Wang <leidwang@redhat.com>1 parent 3bdd826 commit 7417f97
1 file changed
Lines changed: 50 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
438 | 448 | | |
439 | | - | |
| 449 | + | |
| 450 | + | |
440 | 451 | | |
441 | | - | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
442 | 469 | | |
443 | 470 | | |
444 | | - | |
445 | | - | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
446 | 486 | | |
447 | 487 | | |
448 | 488 | | |
| |||
0 commit comments