AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   [REQ-TUT] Socket (https://forums.alliedmods.net/showthread.php?t=293374)

Adryyy 01-30-2017 13:52

[REQ-TUT] Socket
 
I need a tutorial for socket, to read a code from a php file.

I tried https://forums.alliedmods.net/showthread.php?t=41913 but not read code

Black Rose 01-30-2017 14:37

Re: [REQ-TUT] Socket
 
There are ways that will help you communicating through HTTP.
Include: HTTP by Bugsy.
API: HTTP:X by me.
API: HTTP Downloader by Bentski.
Module: Curl by Polarhigh (or Levenus Supremus).
Module: Threaded HTTP by joropito.

Adryyy 01-30-2017 15:37

Re: [REQ-TUT] Socket
 
Thanks..Idk why appear this error '
L 01/30/2017 - 22:31:56: -------- Mapchange to de_dust2 --------
L 01/30/2017 - 22:31:56: [AMXX] Plugin "test.amxx" failed to load: Plugin uses an unknown function (name "HTTPX_GetData") - check your modules.ini.' ??

EFFx 01-30-2017 15:52

Re: [REQ-TUT] Socket
 
Install the httpx.amxx

gabuch2 01-30-2017 15:52

Re: [REQ-TUT] Socket
 
The HTTP:X plugin must be loaded in your server.

ninja'd

Adryyy 01-30-2017 16:00

Re: [REQ-TUT] Socket
 
Oh..2 plugins?? No..i will use http2. Thanks!

Black Rose 01-31-2017 08:42

Re: [REQ-TUT] Socket
 
Two plugins instead of one is almost always a better way.

Remember, HTTP2 hasn't been updated since I released HTTP:X. I can't remember if there are bugs that I have fixed since. I don't think so.
It's easier for plugin creators to use an API since you can just copy the requires lines from the include to avoid local compilation and copying the complete include. Not very likely but you may run into conflicts when using an include in a very active way like HTTP/HTTP2. Running several plugins with such includes also just adds to the stack. It's better to que everything in one place, enable cvars, et.c.
Also. If there are bugs in the API you don't need to recompile the plugin with an updated include. HTTP:X will even update itself if a new version is available.
Not that there are any bugs. ;)

So if you're planning to release your plugin publically and you're deciding between HTTP2 vs. HTTP:X. I strongly suggest X.


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

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