This is indeed on Windows, and interestingly enough it does appear to work on other platforms (OSX in particular does not give the error). I'm not familiar with "completion ports" but I looked it up and it appears they are created with "CreateIoCompletionPort" which doesn't exist anywhere in my code. The socket in question is actually created in a fairly normal way:

SOCKET new_sock = INVALID_SOCKET;
new_sock = accept(svr_sock, (struct sockaddr*)&sin, &size);

After that, a few other things are done to the socket -- namely, setting it as non-blocking using ioctlsocket, and using setsockopt for SO_LINGER and SO_OOBINLINE. Any help is greatly appreciated.

On Mon, Nov 9, 2009 at 3:37 AM, Tore Halvorsen <tore.halvorsen@gmail.com> wrote:
tiredashell <tiredashell <at> gmail.com> writes:

> 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.


Is this on windows with native socket already mapped to a completion port?





_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users