Esempio n. 1
0
    private void Awake()
    {
        NUWeb.onConnected += () =>
        {
            StringBuilder sw = new StringBuilder();
            sw.AppendLine("GET / HTTP/1.1");
            //sw.AppendLine("Host: 191.4.232.35");
            sw.AppendLine("Connection: keep-alive");
            sw.AppendLine("User-Agent: NUWebClient");
            sw.AppendLine("cache-control: no-cache");
            sw.AppendLine(); //REALLY NEEDED!!! OTHERWISE IT WONT WORK

            Debug.Log(sw.ToString());
            NUWeb.Send(sw.ToString());
        };

        NUWeb.onResponse += (WebPacket webPacket) =>
        {
            Debug.Log(webPacket);
        };
    }
Esempio n. 2
0
 private void OnApplicationQuit()
 {
     NUWeb.Disconnect();
 }
Esempio n. 3
0
 private void Start()
 {
     NUWeb.Connect("10.0.1.9");
 }
Esempio n. 4
0
 private void LateUpdate()
 {
     NUWeb.ProcessQueues();
 }