Hey!
I now try to send packet with boost asio, and i store packet data in boost array. Before i was sending it by dynamic allocated char array.
I declare array by boost::array<char, 5824>
I send it by boost asio (synchronously). But problem is there when client receive packet, about 1000 first bytes are ok, but other contains random data.
What I doing there wrong ? I tried different combinations, but result is same. Thanks!
edit
I fill up data by memcpy on array pointer obtained by method array.data();
For example memcpy(array.data()+10, &chararray, 15);
Data is sended by boost::asio::write(socket_, boost::asio::buffer(array));