/// Initializes the server with an endpoint.
 public TcpServer(IPEndPoint endpoint)
 {
     this.endPoint = endpoint;
     pendingConnectionQueueSize = 100;
     delimiter = "";
     debugger  = YucoDebugger.instance;
 }
 /// Initializes the server with a port, the endpoint is initialized with IPAddress.Any.
 public TcpServer(int port)
 {
     endPoint = new IPEndPoint(IPAddress.Any, port);
     pendingConnectionQueueSize = 100;
     delimiter = "";
     debugger  = YucoDebugger.instance;
 }
    // ----------------------------------------------------------------
    public override void Init()
    {
        // Debugger
        debugger = YucoDebugger.instance;

        debugLogPath      = "C:/yucolab/" + Application.productName + "/Log";
        fullResourcesPath = Application.streamingAssetsPath + "/";

        iniInternal_path = fullResourcesPath + "internal/settings";
        iniInternal      = new IniFile();

        iniCms_path = fullResourcesPath + "facialUI_cms/settings";
        iniCms      = new IniFile();
    }
Example #4
0
    // === Core functions ========================================================================================================================================
    // ----------------------------------------------------------------
    void Start()
    {
        // Setting Manager and XML loading
        settingManager = SettingManager.instance;
        settingManager.LoadInternalSettings();
        debugger = YucoDebugger.instance;
        // UDP sender
        udpSender = GetComponent <UdpSender>();
        udpSender.SetServerInfo(settingManager.ip, 9999);
        // UDP receiver
        udpReceiver = GetComponent <UdpReceiver>();
        udpReceiver.StartListening(9998);
        udpReceiver.UdpReceived += OnUdpReceived;
        // Screensaver Timer
        screensaverTimer.SetTimeLimit(settingManager.idleTime);
        stillHerePopUp.SetTimeLimit(settingManager.stillHereCountdownTime);

        // Play BGM?
        if (settingManager.playBgm == true)
        {
            audioSrc_bgm.Play();
        }

        // Arrow X
        foreach (RectTransform arrow in lookCamArrows)
        {
            arrow.anchoredPosition = new Vector2(settingManager.arrowX, 0);
        }

        // Web API Manager
        webApiMgr = WebApiManager.instance;

        // Reset Game
        ResetGame();

        if (TouchManager.Instance != null)
        {
            TouchManager.Instance.PointersPressed += pointersPressedHandler;
        }
    }
        // === Constructor functions ========================================================================================================================================

        /// Default constructor.
        public TcpServer()
        {
            pendingConnectionQueueSize = 100;
            delimiter = "";
            debugger  = YucoDebugger.instance;
        }
 /// Initializes the server with a 4 digit IP address and port.
 public TcpServer(string address, int port)
 {
     endPoint = new IPEndPoint(IPAddress.Parse(address), port);
     pendingConnectionQueueSize = 100;
     debugger = YucoDebugger.instance;
 }