I'm trying to send a file between a client and a server in my home network. I just want to test with a simple file, client.txt.
The client program should read X bytes and send it over the tcp socket I've created, but I cant wrap my head around how to do the sending part:
f = open("client.txt", "rb")
while 1:
// should read X bytes and send to the socket
I think I need to check if the data I want to send is valid, if a file for instance is smaller then the amount (1024 for instance) I'm sending in each batch.... or does it not work that way?