using UnityEngine; using System.Collections; using System; //example of websockets /* public class EchoTest : MonoBehaviour { private void Log(String str) { Debug.Log(str); } // Use this for initialization IEnumerator Start () { WebSocket w = new WebSocket(new Uri("ws://localhost/WebSocketsTest")); yield return StartCoroutine(w.Connect()); w.SendString("Hi!"); int i=0; while (true) { string reply = w.RecvString(); if (reply != null) { w.SendString ("Hi:" + i++); } if (w.error != null) { //Log ("Error: "+w.error); break; } yield return 0; } w.Close(); } } */