Пример #1
0
 internal SocketIOWebGLInstance(string gameObjectName, string targetAddress, bool enableReconnect) : base(gameObjectName, targetAddress, enableReconnect)
 {
     SocketIOManager.LogDebug("Preparing WebGL-Based Socket.IO instance for " + gameObjectName);
     this.GameObjectName = gameObjectName;
     this.InstanceName   = this.GameObjectName + "_" + System.Guid.NewGuid().ToString("N");
     //CreateSIOInstance(this.InstanceName, this.GameObjectName, targetAddress, enableReconnect ? 1 : 0);
 }
Пример #2
0
 public static bool CheckAvailability()
 {
     if (SIODispatcher.Instance == null)
     {
         SocketIOManager.LogError("Unable to instantiate SIODispatcher. You can try to manually create a GameObject with the SIODispatcher Behaviour in your scene.");
         return(false);
     }
     return(true);
 }
Пример #3
0
        public override void Connect(string targetAddress, bool enableReconnect, SIOAuthPayload authPayload)
        {
            base.Connect(targetAddress, enableReconnect, authPayload);

            string payload = "";

            if (this.authPayload != null)
            {
                payload = this.authPayload.GetPayloadJSON();
            }

            SocketIOManager.LogDebug("Creating and connecting WebGL-Based Socket.IO instance for " + this.GameObjectName);
            CreateSIOInstance(InstanceName, this.GameObjectName, targetAddress, enableReconnect ? 1 : 0, payload);
        }
Пример #4
0
 internal SocketIOWebGLInstance(string instanceName, string targetAddress) : base(instanceName, targetAddress)
 {
     SocketIOManager.LogDebug("Creating WebGL-Based Socket.IO instance for " + instanceName);
     this.InstanceName = instanceName;
     CreateSIOInstance(instanceName, targetAddress);
 }