Пример #1
0
 void OnDestroy()
 {
     if (_client != null) {
         _client.Dispose();
         _client = null;
     }
 }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        stats = new RingBuffer<NtpStat>(nSamplesPOT);
        var address = Dns.GetHostAddresses(remoteHost)[0];
        var serverEndpoint = new IPEndPoint(address, remotePort);
        _client = new nobnak.OSC.OscClient(serverEndpoint);
        _client.OnReceive += HandleReceived;;
        _client.OnError += delegate(System.Exception obj) {
            Debug.Log(obj);
        };

        StartCoroutine("Request");
    }