Ejemplo n.º 1
0
 /// <summary>
 /// Allows to listen to incoming connections using a given name/address.
 ///
 /// This is in addition to the definition of the IBaseNetwork interface which is
 /// shared with other network systems enforcing the use of ip:port as address, thus
 /// can't allow custom addresses.
 /// </summary>
 /// <param name="name">Name/Address can be any kind of string. There might be restrictions though depending
 /// on the underlaying signaling channel.
 /// An invalid name will result in an InitFailed event being return in Dequeue.</param>
 public void StartServer(string name)
 {
     if (this.mIsServer == true)
     {
         UnityEngine.Debug.LogError("Already in server mode.");
         return;
     }
     CAPI.Unity_WebRtcNetwork_StartServer(mReference, name);
 }