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