8

Can the recv() function receive more bytes than its internal buffer?

view full story
linux-howto

http://stackoverflow.com – I am new to sockets in Linux and trying to understand how the recv() works. Tried a scenario where I couldn't find an explanation clearly. I hope somebody out there can enlighten me. Here is the scenario: Using TCP Sockets to send data of 5 MiB between two process (Sender and Receiver). I execute these process on i.MX6 Sabrelite board which is running Linux. Sender.cpp: char buffer[5MB]; send(sendSocket, (void*) buffer, 5 MiB, 0); Receiver.cpp: char buffer[5 MiB]; int count = 0; do { rbytes = recv(receiveSocket, (void*) buffer, 5MB, 0); printf("Recv'd %d. %d\n",count,rbytes); (HowTos)