I'm have a problem sending data as a file from one end of a socket to the other. What's happening is that both the server and client are trying to read the file so the file never gets sent. I was wondering how to have the client block until the server's completed reading the file sent from the client.
I have this working with raw packets using send and recv, but figured this was a cleaner solution...
Client:
- connects to server creating socket connection
- creates a file on socket and sends data
- waits for file from server
Server:
- waits for file from client
Complete interraction:
- client sends data to server
- server sends data to client
Edit
The code I'm actually looking at was posted in this question, but I think the Eventlet stuff scared people... http://stackoverflow.com/questions/2909358/eventlet-client-server
Underneath its just using Python sockets so I figured I'd simplify the question and ask about just the core socket issue...