Raised This Month: $ Target: $400
 0% 

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


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Crytiqal
Junior Member
Join Date: Jan 2013
Old 01-31-2013 , 15:41   Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Reply With Quote #11

I have the plugin working, it seemed after compiling I had to copy and paste the newly created .smx over to the plugins folder instead of having it stay in the compiled folder.

Now that it is working, is there a way to have it run on the gameserver port? Or at least on a variable port so multiple server can be watched?

EDIT:

I found it out myself and made a slight adjustment in the script:

Code:
 
public OnAllPluginsLoaded()
{
decl String:sServerIP[40];
new longip = GetConVarInt(FindConVar("hostip")), pieces[4];
pieces[0] = (longip >> 24) & 0x000000FF;
pieces[1] = (longip >> 16) & 0x000000FF;
pieces[2] = (longip >> 8) & 0x000000FF;
pieces[3] = longip & 0x000000FF;
FormatEx(sServerIP, sizeof(sServerIP), "%d.%d.%d.%d", pieces[0], pieces[1], pieces[2], pieces[3]);
new dport = GetConVarInt( FindConVar( "tv_port" ) );
if(g_hListenSocket == INVALID_WEBSOCKET_HANDLE)
g_hListenSocket = Websocket_Open(sServerIP, dport, OnWebsocketIncoming, OnWebsocketMasterError, OnWebsocketMasterClose);
}
Any plans on making this compatible for csgo?
Would that require a rewrite of the sockets? websockets? or the websockets_sourcetv2d?

Last edited by Crytiqal; 02-02-2013 at 12:17.
Crytiqal is offline
 



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 00:20.


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