Skip to content
Advertisement

Tag: boost-asio

Compiling standalone ASIO with Makefile on Linux

I’m trying to compile a small c++ program that captures an image from a camera using libv4l2 and then sends it over UDP to a separate computer using asio. The file structure of the project is: My Makefile for the project is: However, when I try to compile this, my compiler spits on dozens of undefined reference errors for ASIO

boost asio notify server of disconnect

I was wondering if there is any way to notify a server if a client side application was closed. Normally, if I Ctrl+C my client side terminal an EOF-signal is sent to the server side. The server side async_read function has a handle which has boost::system::error_code ec argument fed into it. The handle is called when the server side receives

SO_RCVTIME and SO_RCVTIMEO not affecting Boost.Asio operations

Below is my code When I use Telnet to connect, but not sending data, it does not disconnect from a Telnet timeout.Will need to do to make setsockopt kick in? Thanks! I have modified SO_RCVTIMEO to SO_SNDTIMEO. Still unable to timeout in the specified time Answer Using SO_RCVTIMEO and SO_SNDTIMEO socket options with Boost.Asio will rarely produce the desired behavior.

Advertisement