c++ Send File from Server to Client -


im working on new project send file computer computer b on internet. have in general accomplish that? want simple, so: computer sends computer b on forwarded port , computer b saves comes.

this thought of: check if file has been send checking flagfile. need open upnp port on a, file f. try connect b on forwarded port p. send file b b saves file f on defined path. creates success send file flagfile

if connecting fails, try again after m minutes.

if know functions this, please tell me. im looking around , there many actually.

it's difficult know begin question phrased. if looking libraries/frameworks, first of i'd recommend against doing sort of thing in c++ unless performance of huge importance you. instead use go or node or python or ruby or java.

assuming want in c++ , learning experience, here function calls you'd need learn if decided use sockets api:

  • socket: creates file-like object can write data on computer , read on computer b.

  • bind: associates socket advertised address on computer b computer can find it.

  • connect: connects socket on computer socket on computer b data writes can read b

  • listen, accept: computer b calls these complete connect process a

  • read , write or send , recv communication once connection setup complete.

man pages friend @ point. hope helps.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -