
I can't seem to write to my tcp socket with boost::asio any buffer with len > 14: uint8_t tmp[20]; int len = 20; asio::write(_socket, buffer(tmp, len)); if len > 14, it will always only return 14 bytes written! If len < 14, it writes correctly. What's going on?

I can't seem to write to my tcp socket with boost::asio any buffer with len > 14:
uint8_t tmp[20]; int len = 20; asio::write(_socket, buffer(tmp, len));
if len > 14, it will always only return 14 bytes written!
If len < 14, it writes correctly.
This doesn't seem reasonable. Do you have a minimal reproducing code? Maybe you try to pass a local buffer to an async. function?

This doesn't seem reasonable. Do you have a minimal reproducing code? Maybe you try to pass a local buffer to an async. function?
Sorry, yet it was me being stupid! :) My cout with reporting '14' when i was trying to send '20'. 20d=14h! :) So I had an unclosed << hex<< somewhere :)
participants (2)
-
David Kaplan
-
Igor R