title: c++ Send File from Server to Client
body: <p>Im working on a new Project to send a file from Computer A to Computer B over internet.
  What do I have to do in General to accomplish that?
  I want it to be simple, so:
  Computer A sends it to Computer B on a forwarded port and 
  Computer B saves it as it Comes.</p>
  
  <p>This is what I thought of:
  A Check if file has already been send by checking flagfile.
  I Need to open a UpnP Port on A, do  with file f.
  Try to connect to B on forwarded Port p.
  Send file to B
  B saves file as f on defined path.
  A creates success send file flagfile</p>
  
  <p>If connecting Fails, try again after m minutes.</p>
  
  <p>If you know the functions to do this, please tell me. Im looking around and there are too many actually.</p>