Closed germanllop closed 5 years ago
Which version of Node.js are you running? The referenced function is this one https://nodejs.org/api/net.html#net_net_createconnection
I'm using the latest 11.4.0. Thanks.
I found the problem, I was trying to do it from the browser (Vue) it doesn't allow that level of connections, so I need to use a websocket.
Yeah, you'll need to proxy through a server.
Hi, I'm trying to use Vue (Webpack) to connect via rcon to some servers, there is an issue when I launch the connect() function: Uncaught TypeError: o.createConnection is not a function
Here is my code:
import Rcon from "rcon"
let options = {
tcp: true, // false for UDP, true for TCP (default true)
challenge: true // true to use the challenge protocol (default true) }
const server = new Rcon(this.ip, this.port, this.rcon_password,options)
console.log(server.connect())
Before the server.connect() if I log the server variable, the object was created succesfully.