Пример #1
0
    void Start()
    {
        server = GetComponent <SEDSS_Server>();
        server.SetPassword(password);
        server.StartServer();

        server.OnDataUploaded = (data, id) => {
            ReceiveData   = new UTF8Encoding(false).GetString(data);
            ReceiveDataID = id;
            Debug.Log("Server data received ID:" + id);
        };
        server.OnDownloadRequest = (id) => {
            Debug.Log("Server data send ID:" + id);
            SendDataID = id;
            return(new UTF8Encoding(false).GetBytes(SendData));
        };
    }
Пример #2
0
    void Start()
    {
        server = GetComponent <SEDSS_Server>();
        server.SetPassword(password);
        server.StartServer();

        server.OnDataUploaded = (data, id) => {
            File.WriteAllBytes(ReceiveFilePath, data);
            ReceiveDataID = id;
            Debug.Log("Server data received ID:" + id);
        };
        server.OnDownloadRequest = (id) => {
            Debug.Log("Server data send ID:" + id);
            SendDataID = id;
            return(File.ReadAllBytes(SendFilePath));
        };
    }
Пример #3
0
    void Start()
    {
        externalReceiver = GetComponent <EVMC4U.ExternalReceiver>();

        server = GetComponent <SEDSS_Server>();
        server.SetPassword(password);
        server.StartServer();

        server.OnDownloadRequest = (id) => {
            Debug.Log("Server responced");
            return(File.ReadAllBytes(SendFilePath));
        };

        server.OnDataUploaded = (data, id) => {
            Debug.Log("Server received");
            externalReceiver?.LoadVRMFromData(data);
        };
    }