예제 #1
0
    // Use this for initialization
    void Start()
    {
        if (!HttpListener.IsSupported)
        {
            Debug.Log("HttpListener not supported");
            return;
        }


        taskExecutor       = GameObject.Find("TaskExecutor");
        taskExecutorScript = taskExecutor.GetComponent <TaskExecutorScript>();

        try
        {
            httpListener = new HttpListener();
            httpListener.Prefixes.Add("http://*:" + port.ToString() + "/");

            httpListener.Start();

            listenerThread = new Thread(StartListener);
            listenerThread.Start();

            Debug.Log("Server started");
        }
        catch (Exception e)
        {
        }
    }
예제 #2
0
 void GetSceneObjectReferences()
 {
     taskExecutor       = GameObject.Find("TaskExecutor");
     taskExecutorScript = taskExecutor.GetComponent <TaskExecutorScript>();
 }