[Plugin] Socket.io Client

EDIT: I just tested my theory that it is an socketIO version problem since the legacy server is running 0.9. Set up some local servers on my pc one with 1.x and one for 0.9, 0.9 only throws warnings when Unreal tries to connect, 1.x accepts the connection.

Hi,
so I tried modifying your source code, but it seems I can’t get it to run. Even if I hardcode IP, namespace, eventname and data into the source nothing gets through to the server.



void USocketIOClientComponent::Connect(FString AddressAndPort, FString nSpace)
{
	if (!AddressAndPort.IsEmpty())
	{
		Namespace = nSpace;
		PrivateClient.connect("http://192.168.1.50:5000");//StdString(AddressAndPort));
		UE_LOG(LogTemp, Log, TEXT("%s"), *nSpace);
		
	}
...

void USocketIOClientComponent::Emit(FString Name, FString Data)
{
	FString speed = FString(TEXT("100"));
	FString nsp = FString(TEXT("/events"));
	FString eve = FString(TEXT("unityFanSpeedEvent"));
	PrivateClient.socket(StdString(nsp))->emit(StdString(eve),StdString(speed));
	//PrivateClient.socket("/servo"/*StdString(Namespace)*/)->emit("enable");//StdString(Name), StdString(Data));
	UE_LOG(LogTemp, Log, TEXT("Emit %s with %s"), *Name, *Data);
}


i also tried “events” or “events/” to make sure its not a problem with the namespace. Here is a code snippet from the Unity Project the Server was originally created for (written in C#):
Connect:



client = new Client("http://192.168.1.50:5000");

		client.Error += SocketError;
		client.Message += SocketMessage;

		socket = client.Connect ("/events");


Emit:



public void EventFanSpeed(int speed) {
		if (oldSpeed == speed)
			return;

		socket.Emit("unityFanSpeedEvent", "" + speed, null);
		oldSpeed = speed;
	}


Could it be that the Problem is that the server runs SocketIO 0.9?