Hi, You can use sockets or pipes. Post Comments |
|
Hi, Well if you plan to do this with FTP, MFC has FTP client code. You will need an FTP Server and you will need a file naming convention so that your files don't overwrite each other without you meaning to.
If you go the TCP/IP route, you will need to write a Socket Server to so the (Socket) Client can download its data to it. Any server you use (FTP or other) will need to be visible on the internet. You will want some kind of encryption.
I think that if you want a short burst of several MB of data, FTP will be a better way to get your info. Also FTP already has security built in. It may be better if your in a hurry to bang your app out. A sockets app may require some extra debugging that you may not have time for now.
Here are some examples of WinSock programming:
http://tangentsoft.net/wskfaq/
FTP Examples are in the MSDN/and MSDN Library CD shipped with VS2008.
Post Comments |
|
Re: I would love to rate your reply
|
Waclawa Zozo |
|
3/31/2009 10:40:34 PM |
Hakkim, I would love to rate your reply but do not know ho w - enlighten m. am pleasantly surprised by the vi ability of ftp because i thought it might have bee n a crude relic of the past. the data bursts would unlikely be more than 2000 b ytes and would be relatively widely spaced - perha ps never less than one minute apart from one sourc e. if i understand you correctlly the use of a conitn uously running monitor on both ends that would det ect changes in directory contents would be an acce ptable process design. what are pipes? Post Comments |
|
Quote: Hakkim I would love to rate your reply but do not know how - enlighten m. am pleasantly surprised by the viability of ftp because i thought it might have been a crude relic of the past. Well the FTP relic is still a standard. So viability is not a question, it is more dependent on your application.
Quote: Originally Posted byWalclawa View Post the data bursts would unlikely be more than 2000 bytes and would be relatively widely spaced - perhaps never less than one minute apart from one source. Reading this makes me think you will need sockets since data may be coming at 60 second increments in smallish chunks.
Quote: Originally Posted byWalclawa View Post
if i understand you correctlly the use of a conitnuously running monitor on both ends that would detect changes in directory contents would be an acceptable process design. Yes. That is the typical mode of operation of a socket server. It constantly waits for data, handles it and then returns to either looping or blocking or sleeping depending on the server you choose (non-blocking, blocking, event driven, thread based). The tangentsoft website has several examples even including asynchronouse servers.
Quote: Originally Posted by Walclawa View Post
What are pipes? Pipes are FIFOs used for interprocess communication, so usage of this does not really apply to your question.
Post Comments |
|
Re: Thanks - still need to know how to register a rating for your response
|
Waclawa Zozo |
|
3/31/2009 10:50:51 PM |
Hakkim, Thanks - still need to know how to register a rating for your response. the infor was quite helpful - it seems to me that the use of ftp and the monitoring of "dead letter drop" directories is an acceptable process model. not quite sure what you meant by the comment about sockets being appropriate for smallish chunks of data a minute apart. seems to me the ftp/dld process would work just. the communicating computers would not be on anything close to a formal network like a lan or wan. thanks again. Post Comments |
|
Quote: Originally Posted by Walclawa View Post the infor was quite helpful - it seems to me that the use of ftp and the monitoring of "dead letter drop" directories is an acceptable process model. I am glad to be helpful. Yes you are correct.
Quote: Originally Posted by Walclawa View Post Hakkim, thanks - still need to know how to register a rating for your response. There is an old fashioned scale graphic by the top right side of the post. Click it, and a dialog will appear, click the approve radio button and add a comment. Then click the button that says add to reputation.
Quote: Originally Posted by Walclawa View Post not quite sure what you meant by the comment about sockets being appropriate for smallish chunks of data a minute apart. I got that from your earlier post: Quote: Originally Posted by Walclawa View Post the data bursts would unlikely be more than 2000 bytes and would be relatively widely spaced - perhaps never less than one minute apart from one source. Yes FTP could work, however since I see the data is issued at a rate of up to every minute, I thought that since it was only 2KB of data maybe you could make a custom socket server to quickly and cleanly collect the data.
Quote: Originally Posted by Walclawa View Post seems to me the ftp/dld process would work just. the communicating computers would not be on anything close to a formal network like a lan or wan. thanks again. Yes FTP is fine. Keep in mind with that you will have to keep tabs on all the files that will be generated. This could mean file management and dealing with file naming conventions. Nothing worse than a messy hard drive.
Hope, it will help,
Post Comments |
|
FTP is for file transfer. You have mentioned that data is to be transmitted. If it is files that you need to transfer, then you should use FTP. If it is not files that you need to transfer, then you should not use FTP. If both PCs are on the same LAN, you could use pipes. Check CreateNamedPipes API. Otherwise use sockets. Post Comments |
|