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: associatessocketadvertised address on computer b computer can find it.connect: connects socket on computer socket on computer b data writes can read blisten,accept: computer b calls these completeconnectprocess aread,writeorsend,recvcommunication once connection setup complete.
man pages friend @ point. hope helps.
Comments
Post a Comment