AW: Re: [INC] HTTP2
Quote:
I think I can remove "Add Plugins to xRepo" from my list. |
Re: [INC] HTTP2
I was experimenting a little with new functions for HTTP2.
This enables you to download and install modules that is required for your plugin automatically. This only works for natives, if the inc has stocks which you are using it will not work since they are written into the plugin when you compile it. I'm not sure I'll add this feature to HTTP2. The whole point is to exclude the use of includes and pre-installation of modules. The point of defining the used natives if there's no include is that you could compile it with the AMXX webcompiler and it will still run. So if you're using this you'll have to copy/paste the neccessary native lines from the inc file. You only need the ones you use in your plugins, you can skip the rest. library and name are not just made up or guesses. They are defined in the moduleconfig.h as (for example): #define MODULE_NAME "Test" #define MODULE_LIBRARY "test" The only problem I've faced is that you can not restart the server using server_cmd("restart") at the point of plugin_natives(). So you'll have to wait for a mapchange/restart/crash. What you should know: This does not work with zipped files because AMXX is unable to unpack them without the use of a module. If you want to use this you'll just have to whine to the module author to attach the binary separately. Method #1, automatic library loading (if the module supports it): Code:
Method #2, library not defined in moduleconfig.h. We'll have to force loading.: Code:
The function (_HTTP2_ParseHeader() and _HTTP2_ParseURL() can be found in HTTP2 inc): Code:
Here's a result using method #1: Run #1: Code:
L 09/14/2013 - 21:04:34: [AMXX] Plugin "test7.amxx" failed to load: Module/Libra Code:
Testfunc: 27 As always, use it however you like. Copy it, modify it, create your version based on it. No need for credit. The source code of the module in the example is useless but can be found here. |
Re: [INC] HTTP2
VEryy cool Include BK , but having a question , can help me with this inc at showing an example please :
stock HTTP2_UpdatePlugin(const URL[]) |
Re: [INC] HTTP2
Code:
Of course there are problems with this. By linking to an automatically compiled file on the AM forum it cannot include HTTP2. In this case I would suggest copying the HTTP2 include into your plugin and strip the things you don't need. Another option is to use a third party webcompiler that compiles the source posted on AMXX. It doesn't have to be used at plugin_init(), but make sure you only call it once per load at the absolute maximum. To avoid flooding HTTP servers it really should be downloaded once per day or week. |
Re: [INC] HTTP2
Quote:
Lets say i have this lin : *snip* And not be a more good method to use in plugin_cfg ???? |
Re: [INC] HTTP2
It doesn't matter where you call it. It will still be delayed because of the download process. It takes time to connect to the server and receiving the data. This is the reason it's using a task/think. It won't freeze the server until it's done.
The new binary will be loaded after mapchange either way. |
Re: [INC] HTTP2
So i have this subdomanin with a file test.amxx but when click him show descriptate code not auto download will work usie HTTP2_Update function ???
click : *snip* |
Re: [INC] HTTP2
I don't understand. What is "descriptate code"?
The link has to point directly to the binary file or indirectly by writing the data as output to the stream or through a 30X redirection. It will not work if the link is a page with a download link. You can on the other hand download that page first to parse for the download link and enter that instead. |
Re: [INC] HTTP2
How to use this Includes to making an radio ?
|
[INC] HTTP2
What do you mean?
|
All times are GMT -4. The time now is 03:25. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.