SocketIO how to read values from data

Hello,

I am trying to make a multiplayer game with NodeJS, SocketIO and Unity.
I know how socket io works, but i don’t know how to get the values on the client side.
This is the server code i have tried:

    var io = require('socket.io')({
    	transports: ['websocket'],
    });
    
    io.attach(4567);
    
    io.on('connection', function(socket){
    	socket.emit("hello, {
    		info: "hello",
    	}");
    	socket.on("hi", function(data) {
    		console.log("conenction works");
    	});
    });

and this is the unity code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using SocketIO;

public class _networker : MonoBehaviour
{
    private SocketIOComponent socket;

	public void Start()
	{
		GameObject go = GameObject.Find("SocketIO");
		socket = go.GetComponent<SocketIOComponent>();

		socket.On("hello", function(e){
			Debug.Log(e.data.info);
			socket.Emit("hi");
		});
	}
}

The problem is that the debugger gives me Null instead of “hello”.
Does anyone know how to fix this?

FM WebSocket may fit your need.

asset store: FM WebSocket 1.0 | Network | Unity Asset Store