- Home /
Mono library to connect to Java/Python/Node backend?
Hello guys,
I have been trying to get socket.io library available in the asset store to work for a few days without success, it seems outdated as it throws compile errors. I have been looking for a Mono framework compatible with unity that can help me connect to a backend server (developed in python/java/node). I need to be able to send the server some events, mostly social or regarding matchmaking, noting related to actual gameplay, and the server should be able to send the client some notifications (like invites, friend requests...). I've been looking at RabbitMq which does not seem to be ideal for request/reply needs and Socket.IO which is exactly what I was looking for, but I couldn't find any library still supported.
.NET sockets are my go to, but I am not sure if they are supported on iOS/Android and consoles. Does anyone know any good reliable library that is supported in unity mono?
Answer by mofirouz · Aug 12, 2017 at 09:38 AM
I'm confused as to why you are using Socket.IO?
Unity (5.x + ) has support for using .Net sockets natively. For Android/iOS builds you need to turn off code stripping and it works without any issues. I've written a library that uses .Net Sockets for both HTTP-based requests and Websocket requests. Here is the relevant code that you need to copy.
It's part of the Nakama server which is an open-source server backend for games.