sora1984
New member
- Joined
- Aug 25, 2013
- Messages
- 2
- Programming Experience
- Beginner
Hi I'm working an a patch application for a game we play, the code I have to read the version reads from a text file to get the URL
I have it in a config file so people can use the patcher for their game server also. (hope this is in the correct section)
config
download patch section
Everything works fine its just the the section "wc.DownloadFile(link," doesn't like me using link, (operation times out) but works if I type the exact URL there.
Any ideas as to why I'm still learning but I'm kinda stuck now.
Thank you for any feedback
Regards.
I have it in a config file so people can use the patcher for their game server also. (hope this is in the correct section)
config
VB.NET:
PatchUrl=http://example.com/patchfolder/
ServerKey=blahblah
download patch section
Private Sub Downloader_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles Downloader.DoWork Dim http As String = IO.File.ReadAllLines(Path & "\config")(0) Dim httpx As String Dim CLIENT As String = IO.File.ReadAllLines(Path & "\version")(0) Dim CLIENTVER As String CLIENTVER = CLIENT.Remove(0, 9) httpx = http.Remove(0, 9) Dim patch As String patch = CLIENTVER + 1 link = httpx & patch & ".zip" Dim size As Integer Dim wr As WebRequest wr = WebRequest.Create(link) Dim webr As WebResponse = wr.GetResponse size = webr.ContentLength size = size / 1024 / 1024 ProgressBar3.Maximum = size Label4.Text = "Download Size " & size & " MB" Dim wc As New WebClient wc.DownloadFile(link, Path & "\" & patch & ".zip")
Everything works fine its just the the section "wc.DownloadFile(link," doesn't like me using link, (operation times out) but works if I type the exact URL there.
Any ideas as to why I'm still learning but I'm kinda stuck now.
Thank you for any feedback
Regards.
Last edited by a moderator: