いろいろ試した結果のメモ:
WebSocketなら http://sta.github.io/websocket-sharp/ が良い。
OSXとiOSでws://echo.websocket.orgに接続できることを確認した。
しかし、wssでは接続できなかった。Socket.ioサーバにも接続できなかった。
Socket.ioでの接続は https://github.com/floatinghotpot/socket.io-unity が良い。
OSXとiOSで接続できることを確認した。
ただほかのライブラリと競合して、The imported type `xxx' is defined multiple times みたいなエラーが出る場合は対策が必要。
どちらかのActionをUnityActionに変えるとか。Func<T, TResult>を自分で用意したdelegateに変えるとか。
https://github.com/floatinghotpot/socket.io-unity/issues/1
下記も試したが、バージョンが古いせいか接続できなかった。
https://github.com/NetEase/UnitySocketIO
https://github.com/kaistseo/UnitySocketIO-WebSocketSharp
https://github.com/fpanettieri/unity-socket.io-DEPRECATED
参考:
http://littlewing.hatenablog.com/entry/2015/10/05/144124
コメント