Boost ASIO write: Socket operation on non-socket

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Boost ASIO write: Socket operation on non-socket

Boost - Users mailing list

Hi,

I cannot post the complete program, but when I do asio::write , I get the error:

write: Socket operation on non-socket

Now, just before that I check if the socket is opened or not and it indeed is opened.

io_service is also running..

I just need some pointers and possible cause for this so that I can debug and take his further...

 

My use model is I call asio::write which is synchronous and for reading I use async_read which first reads the header data and then calls asio::read to read the actual data.

 

Best Regards,

Nishant Sharma

 


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Boost ASIO write: Socket operation on non-socket

Boost - Users mailing list
On 11/01/2018 16:24, Sharma, Nishant wrote:
> I cannot post the complete program, but when I do asio::write , I get
> the error:
>
> *write: Socket operation on non-socket*

Without code there's not a lot we can help you with.

Compare your code to the examples included with ASIO and see if there
are any obvious discrepancies.

Try making a separate minimal example program that demonstrates the same
problem.  After doing this you can either post that here for further
help or (more commonly) during the course of trying to reproduce the
problem you will find the cause yourself.

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users