| 465 | } |
| 466 | |
| 467 | int Connect(const ISockAddr* addr) { |
| 468 | int ret = addr->ResolveAddr(); |
| 469 | if (ret < 0) { |
| 470 | return -errno; |
| 471 | } |
| 472 | |
| 473 | ret = connect((SOCKET) * this, addr->SockAddr(), addr->Len()); |
| 474 | if (ret < 0) { |
| 475 | return -errno; |
| 476 | } |
| 477 | |
| 478 | return ret; |
| 479 | } |
| 480 | |
| 481 | int Listen(int backlog) { |
| 482 | int ret = listen((SOCKET) * this, backlog); |
no test coverage detected