ฉันกำลังพยายามส่งไบต์จำนวนมากโดยใช้ไลบรารี boost.asio ดังต่อไปนี้:
void tcp_send(boost::asio::io_service &io, const char *dst_ip, uint16 dst_port)
{
uint8 *sbuff;
size_t slen;
ip::tcp::socket sock(io);
sock.connect(ip::tcp::endpoint(ip::address::from_string(dst_ip), dst_port));
sbuff = new uint8[100412];
sbuff[0] = 67;
sbuff[1] = 193;
sbuff[2] = 136;
sbuff[3] = 60;
boost::asio::async_write(sock, boost::asio::buffer(sbuff, 100412),
boost::bind((&send_handler), placeholders::error));
}
เมื่อฉันตรวจสอบจำนวนไบต์ที่ส่งโดยใช้ wireshark ผู้ส่งจะส่งข้อมูลเสมอและมีเพียง 65536 ไบต์เท่านั้น ไม่รวมไบต์ของส่วนหัว TCP แล้วจะมีปัญหาอะไรล่ะ? มีพารามิเตอร์ใดบ้างที่ฉันจำเป็นต้องแก้ไข
ฉันกำลังรันแอปพลิเคชันบน linux ubuntu ดูเหมือนว่าจำนวนไบต์ที่ส่งสูงสุดคือ 2^16