Create a WebSocket Server with Unity

Hi,

I’m trying to create a websocket server able to communicate with html 5 (WebSockets Standard).

I’ve find some example in c#, but I wasn’t able to use it…

First C# Websockets with Fleck - jxs.me run in a Console project + Chrome/Firefox/Safari, but that use too much .NET 4 script (that not compatible with Unity3d)

Second, Web Socket Server - CodeProject but user was directly disconnected (the good point : I receive the connection from HTML)

Someone has an idea? Or another good C# (.NET 2) example ?

Thanks,

Damien;

Hi,

After some search, I can run a Unity3D standalone windows/macos that can communicate with Google Chrome Firefox with html5 websocket implementation.

With safari I’ve a strange problem, I receive the handshake from the browser, but when I send the server handshake to safari, the connection close. Is like Unity3D Socket can’t communicate with Safari …

Someone has this problem ? or try to implement html5 websocket in unity3d ?

Thanks for any answer.