• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 174
  • Last Modified:

copying files over sockets

hi i have a vb.net program that i want to update files when a new one is available

what i have is a server program with the new .exe file on it and a client program on another computer.

i want to use sockets to transfer the data.

i can already send plain text and that works fine but when i come to transfer a file i cannot get it to work

i need to break the file down then send it bit by bit to the other computer

does anyone have any idea how to do this

thanks
0
cwi2k
Asked:
cwi2k
  • 3
  • 2
2 Solutions
 
gregoryyoungCommented:
I'm curious why you want to do this yourself when there are many great forms of file transfer around already HTTP/FTP as an example

0
 
cwi2kAuthor Commented:
hi the reason is that i have an application that detects when it needs an update (this bit works) and then runs a seperate update program which then copies the file needed from a remote pc via the internet which makes it automatic, and easy to distribute over many pcs quickly

thanks for the reply
0
 
gregoryyoungCommented:
I would take a look at this

http://msdn.microsoft.com/library/en-us/dnbda/html/updater.asp

http://weblogs.asp.net/duncanma/articles/10221.aspx

MS has packaged this functionality into an application block (pretty much just include the .dll and you are ready to go)

I'm not saying that this is superior to your method but it is completed and very well tested.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
y1381Commented:
Though I would highly recommend the above option but if you constraints persist you to use FTP .. you can use this class to program FTP transfer in VB

http://www.freevbcode.com/ShowCode.asp?ID=4655

hth

--yatharth
0
 
gregoryyoungCommented:
you can use ftp transfers with the updater block ... you just have to build in the downloader part ...
0
 
cwi2kAuthor Commented:
hi

i used ftp to download the files

cheers
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now