Raised This Month: $170 Target: $400
 42% 

[DEV] WebSocket Server - Direct connection between webbrowser and gameserver


Post New Thread Reply   
 
Thread Tools Display Modes
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 01-12-2017 , 21:59   Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Reply With Quote #51

Updated to version 1.2

This includes support for incoming fragmented frames and fixes compilation on SM 1.7.
Download in the first post.
__________________
Peace-Maker is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 01-13-2017 , 01:04   Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Reply With Quote #52

Yay ! Thanks !
__________________
Arkarr is offline
Kinsi
Senior Member
Join Date: Apr 2013
Old 02-21-2017 , 13:17   Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Reply With Quote #53

Is it somehow possible to get connection parameters (ws://host:port/path/?parameters...), and reject / "force-disconnect" clients to kinda implement authorization?

Edit: looks like, force-closing is possible but theres no built-in way to get the request path. Ill add that in and propose a PR

Edit2: took me way too long to find out it's easy to add but the PR's there now https://github.com/peace-maker/sm-websocket/pull/4

Last edited by Kinsi; 02-21-2017 at 21:25.
Kinsi is offline
ESK0
Veteran Member
Join Date: May 2014
Location: Czech Republic
Old 09-05-2017 , 15:30   Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Reply With Quote #54

Something is wrong with Websocket_Open?


Code:
SourcePawn Compiler 1.8.0.6025
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2015 AlliedModders LLC
 
D:\Sourcemod\WebSocket - Test\websocket_sourcetv2d (1).sp(111) : error 100: function prototypes do not match
 
1 Error.
Line 111
Quote:
g_hListenSocket = Websocket_Open(sServerIP, 12346, OnWebsocketIncoming, OnWebsocketMasterError, OnWebsocketMasterClose);
__________________
Feel free to add me for private plugins My steam profile.

Last edited by ESK0; 09-05-2017 at 15:30.
ESK0 is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 09-06-2017 , 11:24   Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Reply With Quote #55

I'm guessing you're using the include file from the repository?
The WebsocketIncomingCB signature changed without backwards compatibility - redownload the include file from the repo.
https://github.com/peace-maker/sm-we...d7c154fe46ddd4
__________________
Peace-Maker is offline
Papero
Senior Member
Join Date: Aug 2016
Location: Rimini, Italy
Old 05-28-2018 , 08:36   Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Reply With Quote #56

Quote:
Originally Posted by Dr. McKay View Post
Not sure if it's supposed to support SSL, but when connecting via wss:// I get this:

Code:
[websocket.smx] Failed to extract security key.
Is there any way to support the wss:// now?
(Am getting that error too)
__________________
Papero is offline
Send a message via Skype™ to Papero
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 05-28-2018 , 09:08   Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Reply With Quote #57

Quote:
Originally Posted by Papero View Post
Is there any way to support the wss:// now?
(Am getting that error too)
No.
__________________
asherkin is offline
Papero
Senior Member
Join Date: Aug 2016
Location: Rimini, Italy
Old 06-22-2018 , 13:18   Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Reply With Quote #58

Quote:
Originally Posted by asherkin View Post
No.
To make it work with wss:// (https) would I have to edit the plugin or the Socket extension?
__________________

Last edited by Papero; 06-22-2018 at 13:19.
Papero is offline
Send a message via Skype™ to Papero
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 06-22-2018 , 13:45   Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Reply With Quote #59

You'd need an extension that provides you with a raw socket interface that's tunneled through a TLS encrypted connection. The protocol itself doesn't change.
__________________
Peace-Maker is offline
Papero
Senior Member
Join Date: Aug 2016
Location: Rimini, Italy
Old 06-22-2018 , 14:17   Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Reply With Quote #60

Quote:
Originally Posted by Peace-Maker View Post
You'd need an extension that provides you with a raw socket interface that's tunneled through a TLS encrypted connection. The protocol itself doesn't change.
Atm that's out of my knowledge, if someone could write it for free or not(if so it'd be a public release) would be nice
__________________
Papero is offline
Send a message via Skype™ to Papero
Reply


Thread Tools
Display Modes

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 09:15.


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