예제 #1
0
 /// <summary>
 /// Construct socketIO client with given configuration
 /// </summary>
 /// <param name="config"></param>
 public SocketIO(SocketIOConfigurator config, MonoBehaviour scriptInstance = null) :
     base(config)
 {
     if (Application.platform == RuntimePlatform.WebGLPlayer)
     {
         Socket = new WebGLWebSocket(scriptInstance);
     }
     else
     {
         Socket = new NativeWebSocket(config.Proxy, config.ConnectTimeout);
     }
 }
        public SocketServiceBase(IAppStorageProvider storageProvider, SocketIOConfigurator config, string appName, int timeout = 60000)
        {
            OpenTasks          = new Dictionary <string, OpenTask>();
            EventListenersDict = new Dictionary <string, List <Action <object> > >();

            if (storageProvider == null)
            {
                throw new ArgumentNullException("storageProvider");
            }

            StorageProvider = storageProvider;
            AppName         = appName;
            TimeoutMS       = timeout;
        }
 public SocketService(IAppStorageProvider storageProvider, SocketIOConfigurator config, string appName, int timeout = 60000) :
     base(storageProvider, config, appName, timeout)
 {
     SockIO = new SocketIO(config);
 }
예제 #4
0
 public SocketIO(SocketIOConfigurator config) :
     base(config)
 {
     Socket = new NativeWebSocket(config.Proxy);
 }
예제 #5
0
 /// <summary>
 /// Construct socketIO client with given configuration
 /// </summary>
 /// <param name="config"></param>
 public SocketIO(SocketIOConfigurator config) :
     base(config)
 {
     Socket = new NativeWebSocket(config.Proxy, config.ConnectTimeout);
 }
 public SocketService(IAppStorageProvider storageProvider, SocketIOConfigurator config, string appName, int timeout = 60000, MonoBehaviour scriptInstance = null) :
     base(storageProvider, config, appName, timeout)
 {
     SockIO         = new SocketIO(config, scriptInstance);
     ScriptInstance = scriptInstance;
 }