Boost logo

Boost Users :

Subject: [Boost-users] Boost.Asio: "The parameter is incorrect" when assigning native socket
From: tiredashell (tiredashell_at_[hidden])
Date: 2009-11-08 21:05:39


The error in the subject line occurs when attempting to assign a native
socket to a Boost.Asio socket. I realize it's not very helpful since I'm not
explaining where I am getting nativeSocket, but I was hoping someone let me
know in general the cause of such an error, since there doesn't appear to be
any documentation on it. I am almost positive that it is a valid socket, and
its integer value is normally around 740.

boost::asio::io_service ioserv;
boost::asio::ip::tcp::socket s(ioserv);

boost::system::error_code error;
s.assign(boost::asio::ip::tcp::v4(), nativeSocket, error);
if (error) cout << error.message() << endl;



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net