Re: about transfering files through sockets.......
ninad panday <[email protected]> Thu, 16 Jun 2005 21:54:45 -0700 (PDT)
| Newsgroups | gmane.comp.programming.cppug |
|---|---|
| Message-ID | <[email protected]> |
Hi, Transferring the file over a socket is very simple. I guess you need to have a client which demand for a file and the server which will send the required file. You can use following steps So when you want to send a file you can use the rwo method. 1. Read the data from the file in chunks (using read) and write this chunk to the socket. On Client side read the chunk and write the received chunk to the file 2. Use the sendfile() function on server to send the file at once to the client. What you need to do is first set up a protocl to transfer the name of the file. --- ashish srivastava <[email protected]> wrote: > hello everybody > > myself ashish srivastava > these days im busy in doing socket > programming...... > > i have learned how to transfer the simple > messages through sockets. > > but i m getting big problem in transfering the > whole file ...... > if anyone can provide me the code for this > ..........transfering > of files through sockets....... > > THANKING U > > ashish > > > ____________________________________________________ Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/cppug/ <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/