| 527 | // ---------------------------------------------------------------------------------------- |
| 528 | |
| 529 | int listener:: |
| 530 | accept ( |
| 531 | std::unique_ptr<connection>& new_connection, |
| 532 | unsigned long timeout |
| 533 | ) |
| 534 | { |
| 535 | new_connection.reset(0); |
| 536 | connection* con; |
| 537 | int status = this->accept(con, timeout); |
| 538 | |
| 539 | if (status == 0) |
| 540 | new_connection.reset(con); |
| 541 | |
| 542 | return status; |
| 543 | } |
| 544 | |
| 545 | // ---------------------------------------------------------------------------------------- |
| 546 |