boost asio write/read vector
I have trouble reading a vector from boost asio buffer. I have this vector: std::vector<float> points; And I send it with boost asio write boost::asio::write (socket, boost::asio::buffer(&new_buffers->points.front(), nr_points * 3 * sizeof (float))); On the other end I have: std::vector<float> recv_vector; tcp_socket.async_read_some(boost::asio::buffer(recv_vector), read_handler); When I do recv_vector.size() , its always empty. Can somebody tell me what I am doing wrong? Marek Asio is not a serialization library. It does not serialize random vectors (you could use Boost Serialization for that