I have written tcp client-server, server will read a socket, and client will written packets to that socket.
Mtu : 1500, packets will be fragmented if size exceds mtu.
Case 1: When i did write packet size 1456, 1457,1458,1459,14560 from client, recived the same size packets in server side.
Case 2: When i did write packet size 1461 from client, recived the same size packet, but this should be two packets (pkt-1 size :1460 + pkt-2 size :1)
Got a bit confused while dealing with fragmentations, can any one clarify this.
Edit : sock = socket(AF_INET, SOCK_STREAM, 0); <== socket being used.