Raised This Month: $32 Target: $400
 8% 

How to Force download of multiple files with one http connection


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Cooltad
Veteran Member
Join Date: Apr 2008
Old 03-06-2010 , 04:27   How to Force download of multiple files with one http connection
Reply With Quote #1

Basically, I have over 10 custom sounds and though they are small..I want to make the download process for the user easier by doing this:

Packing them all in one .bz2, and then unpacking them for future use, that's it.

However I am not sure what method would correctly do this.

I was thinking spoofing the download by:
adding the bz file to the download tables under the name of one of the mp3's inside the download, and thus after unpacking it, the game will accept what it has downloaded because it had the file inside of it as one of the files.

I am not sure if that'll work though, any suggestions?
__________________
Please, give me some rep if you found what I posted useful. :]
Cooltad is offline
miniman
Senior Member
Join Date: Aug 2009
Location: Israel
Old 03-06-2010 , 05:15   Re: How to Force download of multiple files with one http connection
Reply With Quote #2

I dont think thats possible the unpacking rules and unpacking itself on the client side I never heared about packing some files that client automaticly download and install all maybe Im wrong
miniman is offline
Cooltad
Veteran Member
Join Date: Apr 2008
Old 03-06-2010 , 05:42   Re: How to Force download of multiple files with one http connection
Reply With Quote #3

It most likely is possible, I just need to know how to accomplish it via a plugin.
__________________
Please, give me some rep if you found what I posted useful. :]
Cooltad is offline
Kigen
BANNED
Join Date: Feb 2008
Old 03-06-2010 , 12:52   Re: How to Force download of multiple files with one http connection
Reply With Quote #4

Its how the client's game handles it, this means it really is outside the realm of a server-side plugin. The only way I think it'd be possible at all is to pack all the sounds into one .bz2, but I'm not sure if the Source engine would even interpret it correctly as the Source engine is surely only expecting one file to be in the .bz2.
Kigen is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 03-06-2010 , 14:13   Re: How to Force download of multiple files with one http connection
Reply With Quote #5

I think, like gzip, bzip2 only handles one file anyway, that's why tarballs are used.
__________________
asherkin is offline
Cooltad
Veteran Member
Join Date: Apr 2008
Old 03-06-2010 , 16:49   Re: How to Force download of multiple files with one http connection
Reply With Quote #6

Got it. SO, is there a way to force the engine to extract a zip file?
__________________
Please, give me some rep if you found what I posted useful. :]
Cooltad is offline
Cooltad
Veteran Member
Join Date: Apr 2008
Old 03-06-2010 , 17:11   Re: How to Force download of multiple files with one http connection
Reply With Quote #7

Even if it normally cannot be done..surely it's possible to make an extension that will command the user's computer to extract a zip file.
__________________
Please, give me some rep if you found what I posted useful. :]
Cooltad is offline
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 03-06-2010 , 17:39   Re: How to Force download of multiple files with one http connection
Reply With Quote #8

I doubt it. It's handled on the client, server extensions can't modify what the client does.
__________________
Greyscale is offline
recon0
Veteran Member
Join Date: Sep 2007
Location: US
Old 03-06-2010 , 17:39   Re: How to Force download of multiple files with one http connection
Reply With Quote #9

It's surely not possible. Imagine what would happen if we could extract random zip files on client machines...

You could try something like pakrat (you'll probably need the older tool, BSPZIP), but that's a really crude solution.
__________________

Last edited by recon0; 03-06-2010 at 17:43.
recon0 is offline
naris
AlliedModders Donor
Join Date: Dec 2006
Old 03-06-2010 , 20:07   Re: How to Force download of multiple files with one http connection
Reply With Quote #10

Quote:
Originally Posted by Cooltad View Post
Packing them all in one .bz2, and then unpacking them for future use, that's it.
1st, a .bz2 files can only have 1 file in it. (to have more than 1 file, you 1st have to tar the files to create a .tar file and then bzip that). This is true of ALL compression methods that come from unix (such as bzip and gzip).

2nd, the engine only supports .bz2 files that contains 1 file, and there is no way around that.

3rd, this is a really bad idea and would not actually make anything easier for anyone.

Last edited by naris; 03-06-2010 at 20:09.
naris is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:38.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode