VScode Websocket Server

I strongly recommend NodeJS for creating a WebSocket Client. Here is a template that might help you get started:

// Create an instance of the WebSocket class
const webSocket = new WebSocket("ws://127.0.0.1:7071/vexrobotics.vexcode/device");

// Define callback functions
function onOpen(event) {
    // Code to execute once the connection has been established
    // Send a message to the server
    webSocket.send("Hello, world!");
}

function onMessage(event) {
    // Code to execute every time a message has been received
    console.log(event.data); // Prints the message to the std output
}

function onClose(event) {
    // Code to execute once the connection has been closed
    // Try to reconnect? End the program?
}

function onError() {
    // Code to execute if an error occurred with the connection
}

// Register the event handlers
webSocket.addEventListener("open", onOpen);
webSocket.addEventListener("message", onMessage);
webSocket.addEventListener("close", onClose);
webSocket.addEventListener("error", onError);

/*
Explanation:

webSocket - instance of the WebSocket class
addEventListener - function that registers an event handler
"open" - name of the event to listen for
onOpen - function to execute when the event occurs
*/

// Close the connection at some point using:
// webSocket.close();

If you want to use Python, you should take a look at the websockets library.

You can easily change the port that the server is running on from the extension settings, but that’s about it.

Is it possible to change the code? Yes.
Is it unnecessary and not worth your time? Probably.

I believe that @Robot101 was providing information about how you can implement the HTTP protocol in general. The VEX robot brains do not have onboard wireless-transmission, and the radio is only capable of communicating with the controller and other radios using the proprietary VEX Communications Protocol.

The WebSocket Server is being hosted on whatever laptop or other device that the extension is running on. The messages being sent to the client reflect the output of the VEX Integrated Terminal. This means that the brain/controller must be connected to your device at all times if you want to receive data.

To send data, simply program your robot to write the diagnostic information to the output stream, preferably formatted so that you know what information is being sent (eg. Motor1Voltage: 6.12);