W
Water Lin
I want to write a socket communication for my study in C++.
Now the socket works, I can communication between server and client.
If I want to send a file from client to server, what should I do?
I think I need to read the file first, then put the file content to socket buffer, then send them. Is this sequence correct?
For txt file, I think it will be OK. But what will happen if I send exe file? How can I read exe file?
I am just a little confused about sending a file......
Water Lin
http://blog.waterlin.org
Now the socket works, I can communication between server and client.
If I want to send a file from client to server, what should I do?
I think I need to read the file first, then put the file content to socket buffer, then send them. Is this sequence correct?
For txt file, I think it will be OK. But what will happen if I send exe file? How can I read exe file?
I am just a little confused about sending a file......
Water Lin
http://blog.waterlin.org