Hi I would ask you for some help.
I already searched around on google but I always found bad examples or atleast I didn't understand them. (If I worked with sockets then mostly in Java and only chat stuff)
So I want to send large data over network, as I read send/recv has a max length and that I have to send data in chunks. Or don't I have to do that?
The large data is in my case a file, which I read in a char vector and want to send it. The files I want to send are between 100-500KB. (depends on which file)
Scenario:
Read file in a char vector, send that char array(vector.data()), client receives it and write to file.
Read to char vector and writing from char vector to file is no problem, only the part with sending/receiving.
Do you have any tips, or good references or snippets to such a scenario? Do I even have to send in chunks or will the TCP protocol handle it?
Thanks in advice!
I already searched around on google but I always found bad examples or atleast I didn't understand them. (If I worked with sockets then mostly in Java and only chat stuff)
So I want to send large data over network, as I read send/recv has a max length and that I have to send data in chunks. Or don't I have to do that?
The large data is in my case a file, which I read in a char vector and want to send it. The files I want to send are between 100-500KB. (depends on which file)
Scenario:
Read file in a char vector, send that char array(vector.data()), client receives it and write to file.
Read to char vector and writing from char vector to file is no problem, only the part with sending/receiving.
Do you have any tips, or good references or snippets to such a scenario? Do I even have to send in chunks or will the TCP protocol handle it?
Thanks in advice!