Raised This Month: $ Target: $400
 0% 

Gameserver Chat to Browser


Post New Thread Reply   
 
Thread Tools Display Modes
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 07-21-2016 , 10:13   Re: Gameserver Chat to Browser
Reply With Quote #41

Quote:
Originally Posted by Yeradon View Post
No it doesn't cost a lot of ressources in practice, but compared to a socket request it is more. Yes sourcemod got this limitations. I mentioned that because of arnes comment:
That comment might require further explanation to you:

Quote:
Originally Posted by Yeradon View Post
Yes you can listen to sockets using php. But since php isn't async you can not react to requests directly. Here is a quote from php.net:
Quote:
Originally Posted by arne1288 View Post
Quote:
Originally Posted by Arkarr View Post
Wait... I thought my solution was simple haha. I think I missunderstood something. Mine solution just require a sourcemod plugin with the extension Socket and a website wich query the server, that's it.
And let me guess, you're opening TCP 12345 with the Socket extension at the SourceMod plugin, so the other end ("website") connects to GAME_SERVER_IP at port 12345 whenever it requests the data? (Port 12345 is just an example)
Quote:
Originally Posted by Arkarr View Post
Yeah. That should do the trick. Correct me if I'm wrong, but that's how Socket work.
There Arkarr confirmed that the listening socket would be in the SourceMod plugin, and that SourceMod plugin would be listening, for example on TCP 12345, and the website would query that.

Even if you build in restrictions on the SourceMod plugin, like limiting the queries to specific IP addresses, the game server will have to process each individual thing that way, just like it has been the cause with flooding the game server's RCON port.

Last time I checked, GSP's did not provide access to make firewall restrictions. Therefore, that way would possibly expose the server to new attacks by overloading that port with crap.

However, if the SourceMod plugin is connecting in outbound direction (e.g. to a TCP port opened in PHP, or something), then what Arkarr confirmed above, isn't correct, and there would somehow be less to worry about.


Another thing to consider would also be the fact that SourceMod is shipped with MySQL support, and that the Socket extension is a third party extension, you are more likely to receive fixes for the MySQL support in case anything would break. There is no guarantee the author of third party extensions will keep them updated, it has been seen with quite a lot of plugins already...
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 07-21-2016 , 10:21   Re: Gameserver Chat to Browser
Reply With Quote #42

Quote:
Originally Posted by arne1288 View Post
[...]
There Arkarr confirmed that the listening socket would be in the SourceMod plugin, and that SourceMod plugin would be listening, for example on TCP 12345, and the website would query that.
[...]
Correct. But since I'll do it with NodeJS now, the server (the one wich will process the messages) won't be the game server but NodeJS, and indeed that's better, like you said above.

Quote:
Originally Posted by arne1288 View Post
[...]
Another thing to consider would also be the fact that SourceMod is shipped with MySQL support, and that the Socket extension is a third party extension, you are more likely to receive fixes for the MySQL support in case anything would break. There is no guarantee the author of third party extensions will keep them updated, it has been seen with quite a lot of plugins already...
[...]
Then, I guess, I'll do my own socket extension.
__________________
Want to check my plugins ?

Last edited by Arkarr; 07-21-2016 at 10:22.
Arkarr is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 07-21-2016 , 14:04   Re: Gameserver Chat to Browser
Reply With Quote #43

I guess you can use this and make AJAX loading it into some box.
__________________
Plugins: TeamGames
Includes: Menu stocks, ColorVariables, DownloadTableConfig

> No help through PM, make a topic.
KissLick is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 07-21-2016 , 16:26   Re: Gameserver Chat to Browser
Reply With Quote #44

Or just have SM serve the websockets.

Sneak peak:
I have an almost completed extension (PoC done and heavily tested, production front-end done, need to finish the production backend) that does this and voice chat and more.
The funding for it disappeared so it's on the back burner as work is busy.
__________________

Last edited by asherkin; 07-21-2016 at 16:27.
asherkin is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 07-21-2016 , 17:33   Re: Gameserver Chat to Browser
Reply With Quote #45

@Asherkin
Oh wow I didn't know this extension ! That's freaking cool ! But I don't think my version would any better then yours, I'll wait until you release it.
__________________
Want to check my plugins ?
Arkarr is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 07-21-2016 , 17:37   Re: Gameserver Chat to Browser
Reply With Quote #46

Please don't, I don't know when it'll be done and it's good to have a plugin-only option for people!
__________________
asherkin is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 07-21-2016 , 17:46   Re: Gameserver Chat to Browser
Reply With Quote #47

Quote:
Originally Posted by asherkin View Post
Please don't, I don't know when it'll be done and it's good to have a plugin-only option for people!
I'll try then.
__________________
Want to check my plugins ?
Arkarr is offline
mazdarx8
Veteran Member
Join Date: Aug 2014
Old 08-17-2016 , 04:58   Re: Gameserver Chat to Browser
Reply With Quote #48

Any news on this ?? : )
mazdarx8 is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 08-17-2016 , 05:54   Re: Gameserver Chat to Browser
Reply With Quote #49

ETA:
Created index.php (file size: 0 octect)

In other words, I did nothing. Mostly because I totally forgot it. I'll try something this week.
__________________
Want to check my plugins ?
Arkarr is offline
mazdarx8
Veteran Member
Join Date: Aug 2014
Old 08-17-2016 , 05:57   Re: Gameserver Chat to Browser
Reply With Quote #50

Quote:
Originally Posted by Arkarr View Post
ETA:
Created index.php (file size: 0 octect)

In other words, I did nothing. Mostly because I totally forgot it. I'll try something this week.
No rush. Thank you.
mazdarx8 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 13:05.


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