C++ Boost.ASIO: passing accepted TCP connection from one opened socket to another using Windows APIs ( while works with Linux APIs)?
问题 I was trying to learn how to re assign accepted connection using Boost.ASIO and Windows API's. found this code sample added to it includes and use of namespaces so now it is compilable - just copy and paste and here you go... "The parameter is incorrect" exception at the same place code poster had it=( So here is code: #include <iostream> #include <boost/asio.hpp> #ifdef _WIN32 #include "Windows.h" #endif using namespace boost::asio::ip; using namespace std; int main(){ int m_nPort = 12345;