예제 #1
0
 public bool Open(int port)
 {
     try
     {
         _client = new UdpClient(port);
         _port   = (_client.Client.LocalEndPoint as IPEndPoint).Port;
     }catch (Exception e)
     {
         Debug.Log("RTPDataChannel Warning: " + e.Message);
         return(false);
     }
     _thread = new DataThread(this);
     _thread.Start();
     return(true);
 }
    public void Start(int port=0)
    {
        try
        {
            _client = new UdpClient (port);
            _port=(_client.Client.LocalEndPoint as IPEndPoint).Port;
        }catch(Exception e)
        {

        }
        _thread = new DataThread (this);
        _thread.Start ();
    }