Score:0

What do actually happens in backend when we transfer file using socket?

cn flag

Pardon me if dumb question, but i am not able to get whether only particular file data(which client requested) gets transferred from server side and and same name file gets created in client and received data gets written or there is a way we can accomplish both this tasks(sending data to client, generating file over there) by writing logic only in server side..

any help would be great, advance thanks..

cyberbrain avatar
cn flag
Did I understand your question correct: You want to create a service that runs on a server (so is always active) that creates a file on a client (that connects to the server only from time to time) without writing individual software on the client? So the client does not request a specific file and "copies" it from the server, but just asks the server "give me a file" and the server then sends the files contents and where it should be created and its name? Maybe it could help if you describe the goal that you want to reach a bit more detailed and also the environment.
Vivek Mak avatar
cn flag
@cyberbrain yes, you get it correct most of the part, I want to implement application where server sends the file which client requests(client will send filename), so my question is in this scenario i'm sending requested file data to client and creating file other there and writing this data to it, so this API( creating file and writing data which received from server) is implemented in client side, so wanted to know is there any way we can make it all happen from server side..
cyberbrain avatar
cn flag
So this sounds if your "client" is a FTP server, and your "server" is a FTP client? How did you find that your server is a "server" (and also for the client). Why can't you just run a FTP server on the "client" ?
Vivek Mak avatar
cn flag
@cyberbrain it's just the part of excercises i've been told to do, Was not able to get how to copy file to client (without writing that API client side, i.e. client side only which file it needs to get code will get written, other API's server side can write..) and is it even possible or not, hence asked
David avatar
cn flag
Sounds like this is a homework question and you have not done anything to solve it but ask here. We do not do your homework you do your homework.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.