| 605 | }; |
| 606 | |
| 607 | Net::Net() |
| 608 | { |
| 609 | platform_data_.reset( new PlatformData ); |
| 610 | |
| 611 | #ifdef _WIN32 |
| 612 | WORD version; |
| 613 | version = MAKEWORD(2, 0); |
| 614 | |
| 615 | const int error_code= ::WSAStartup( version, &platform_data_->ws_data ); |
| 616 | if( error_code != 0 ) |
| 617 | return; |
| 618 | |
| 619 | Log::Info( "WinSock2 started" ); |
| 620 | |
| 621 | #else |
| 622 | // TODO |
| 623 | #endif |
| 624 | |
| 625 | successfully_started_= true; |
| 626 | } |
| 627 | |
| 628 | Net::~Net() |
| 629 | { |
nothing calls this directly
no outgoing calls
no test coverage detected