I am programming a client-server model and have the need to send large amount of data. The client connects to the server, then selects a file to be transfered (like an ftp program) and the server sends it.
The problem is that I cant seem to send packets larger then 7 kbytes.... The client crashes just after recieved 2 packets. I am using this code to create a socket:
sock = socket(PF_INET, SOCK_STREAM, 0);
I have also tried to increase the socket buffer with the following:
setsockopt(sock, SOL_SOCKET, SO_RCVBUF, &sock_buf, &sock_size);
sock_size is an integer currently set to 64000.
This is done with both the recieve and the send buffer on both the client and the server.
If anyone have any tips or suggestions please help me, anything at all is highly appreciated!!!!
The problem is that I cant seem to send packets larger then 7 kbytes.... The client crashes just after recieved 2 packets. I am using this code to create a socket:
sock = socket(PF_INET, SOCK_STREAM, 0);
I have also tried to increase the socket buffer with the following:
setsockopt(sock, SOL_SOCKET, SO_RCVBUF, &sock_buf, &sock_size);
sock_size is an integer currently set to 64000.
This is done with both the recieve and the send buffer on both the client and the server.
If anyone have any tips or suggestions please help me, anything at all is highly appreciated!!!!