Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Please update this plugin, it does not worked for me on css.
I have modified these lines, i just specified a protocol. so it works now in motd Quote:
|
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
I haven't tried to use the motd browser to connect to a websocket server created with this plugin.
What's the error? Does the client reject the connection when lacking a sub protocol? |
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Uhm, i don't remember, but adding protocol will solve the problem.
|
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
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. |
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
I get the same error as above when attempting to connect with NodeJS and socket.io
Not familiar with sp, any pointers on where I might be going wrong? The client.html.txt code works to send messages to the server, but not the following node code Code:
var io = require('socket.io-client'), |
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Quote:
|
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
I understand that, it was mainly for experimental purposes. There is a node module called node-ssq, which I guess uses datagram to connect to a source server.
Code:
var ssq = require('node-ssq');Error [Error: SSQ Request timed out.] I guess I could start playing with it and try to find out why it's not working. |
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
--- IGNORE--- Had to remove the portion that sets the timeout and clears it in node-ssq/ssq.js, after doing so, it queries the server fine.
I'm ashamed to admit this lol, but my source server wasn't running. :( |
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
I got it up and running on CSGO to the point where I can draw players on a radar image. How does one get the information from the .txt file (offsets, zoom, etc)? csgo\resource\overviews has txt files with similar-ish information, but fails to work.
Right now I'm just guessing and it's working well enough, but it'd be nice to automate it. |
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Is it possible to implement a tv_delay on the websocket?
I can ghost all I want. I was trying to get it to connect to a delayed relay server but it seems I cannot open a socket connection to it so that wont work... Also, connecting it to the tv_port from a gameserver with a tv_delay set doesn't matter as the socket sends the data instantly to the browser regardless. |
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Updated to version 1.2
This includes support for incoming fragmented frames and fixes compilation on SM 1.7. Download in the first post. |
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Yay ! Thanks !
|
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
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 :P 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 |
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Something is wrong with Websocket_Open?
Code:
SourcePawn Compiler 1.8.0.6025Quote:
|
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
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 |
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Quote:
(Am getting that error too) |
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Quote:
|
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Quote:
|
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
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.
|
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Quote:
|
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Hi, I used this plugin couple months ago for RCON on SM 1.8. Does this still work in 1.9?
|
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Quote:
i don't see why not |
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
On sourcemod 1.9 whenever the browser tries to connect to the websocket server I get this error:
Code:
L 10/06/2018 - 12:45:53: [SM] Exception reported: Invalid match index passed. |
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Quote:
|
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
That error should be fixed in the latest version in the repository on GitHub.
|
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Hey Bro. I have a problem with your plugin every time the Websocket tries to connect I get this (Disconnected - status 3 Code: 1006. Reason: - wasClean: false) im using the WebSocket chat Example
|
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
and now I have this error
HTML Code:
L 11/23/2019 - 03:32:31: [SM] Blaming: websocket.smx |
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Try the latest version from GitHub. You'll have to compile it yourself though.
|
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
when I try to compile it. I get this error
HTML Code:
//// websocket.sp |
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
2 Attachment(s)
socket.inc and websocket.inc file.
|
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Update: As I suspected, I am an idiot. The issue causing the Invalid Handle error was that my code was in OnPluginStart as opposed to OnAllPluginsLoaded. I plan to get around the lack of ability to select a path endpoint (site.com:port/endpoint) by just using an additional port. However I am now experiencing "Unable to listen on ip: port". Investigating whether this is an issue with my webserver though (most likely).
Original post: Can someone tell me if I have this right: I can only create listening servers using Code:
Websocket_Open(host, port, callbacks...)I assume this is the case because both the author's example programs listen on the same server. This is actually fine while I'm in dev but in production I'll want to have my game servers on a different server than my webserver. However I still must be doing something wrong, because when I try to use Websocket_Open I get this exception: Invalid Handle 0 (error: 4) Code:
#include <sourcemod>Code:
L 09/17/2022 - 23:24:40: [SM] Exception reported: Invalid Handle 0 (error: 4)What if I want to create an outgoing message to a foreign server at will? My main desire for websockets is for my game servers to be clients, chiefly. |
Re: [DEV] WebSocket Server - Direct connection between webbrowser and gameserver
Quote:
https://github.com/peace-maker/sm-websocket/pull/4 Quote:
|
| All times are GMT -4. The time now is 13:48. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.