Ejemplo n.º 1
0
        public PureSocketClusterSocket(string url, PureSocketClusterOptions options, string instanceName)
        {
            _options = options;

            if (_options.DebugMode)
            {
                Log("WARNING: Debug logging is enabled, sensitive data may be disclosed!");
            }

            Log("Creating new instance.");

            if (options.Serializer is null)
            {
                options.Serializer = new Utf8JsonSerializer();
            }

            _counter = 0;

            Channels = new List <Channel>();

            _acks = new Dictionary <long?, object[]>();

            _socket = new PureWebSocket(url, options, instanceName);

            SetupEvents();
        }
        public PureSocketClusterSocket(string url, PureSocketClusterOptions options)
        {
            _options = options;

            Log("Creating new instance.");

            if (options.Serializer is null)
            {
                options.Serializer = new Utf8JsonSerializer();
            }
            _counter = 0;
            Channels = new List <Channel>();
            _acks    = new Dictionary <long?, object[]>();

            _socket = new PureWebSocket(url, options);

            SetupEvents();
        }