/// <summary> /// Construct client connection object and initialized the data buffer /// </summary> /// <param name="clientSocketId"> Underlying client socket connection object</param> /// <param name="size"> Size of the data packet to recieve in buffer.</param> internal ClientManager(ConnectionManager conectionManager, Socket clientSocket, int size, int pinnedBufferSize) { _connectionManager = conectionManager; InitializeBuffer(size, pinnedBufferSize); _eventPriorityRatio = ServiceConfiguration.EventPriorityRatio; _asyncSendQueue = new Alachisoft.NCache.Common.DataStructures.WeightageBasedPriorityQueue(_eventPriorityRatio); _clientSocket = clientSocket; _clientSocketId = new Address(((IPEndPoint)clientSocket.RemoteEndPoint).Address, ((IPEndPoint)clientSocket.RemoteEndPoint).Port).ToString(); }
/// <summary> /// Construct client connection object and initialized the data buffer /// </summary> /// <param name="clientSocketId"> Underlying client socket connection object</param> /// <param name="size"> Size of the data packet to recieve in buffer.</param> internal ClientManager(ConnectionManager conectionManager, Socket clientSocket, int size, int pinnedBufferSize) { _connectionManager = conectionManager; InitializeBuffer(size, pinnedBufferSize); if (!string.IsNullOrEmpty(System.Configuration.ConfigurationSettings.AppSettings["NCacheServer.EventPriorityRatio"])) { try { _eventPriorityRatio = Convert.ToInt32(System.Configuration.ConfigurationSettings.AppSettings["NCacheServer.EventPriorityRatio"]); } catch (Exception e) { throw new Exception("Invalid value specified for NCacheServer.EventPriorityRatio."); } } if (_eventPriorityRatio <= 0) { _eventPriorityRatio = 30; } _asyncSendQueue = new Alachisoft.NCache.Common.DataStructures.WeightageBasedPriorityQueue(_eventPriorityRatio); if (!string.IsNullOrEmpty(System.Configuration.ConfigurationSettings.AppSettings["NCacheServer.BulkEventCollectionInterval"])) { try { _bulkEventCollectionInterval = Convert.ToInt32(System.Configuration.ConfigurationSettings.AppSettings["NCacheServer.BulkEventCollectionInterval"]); } catch (Exception e) { throw new Exception("Invalid value specified for NCacheServer.BulkEventCollectionInterval."); } } if (_bulkEventCollectionInterval <= 0) { _bulkEventCollectionInterval = 1; } _clientSocket = clientSocket; _clientSocketId = new Address(((IPEndPoint)clientSocket.RemoteEndPoint).Address, ((IPEndPoint)clientSocket.RemoteEndPoint).Port).ToString(); }
/// <summary> /// Construct client connection object and initialized the data buffer /// </summary> /// <param name="clientSocketId"> Underlying client socket connection object</param> /// <param name="size"> Size of the data packet to recieve in buffer.</param> internal ClientManager(ConnectionManager conectionManager,Socket clientSocket, int size, int pinnedBufferSize) { _connectionManager = conectionManager; InitializeBuffer(size, pinnedBufferSize); if (!string.IsNullOrEmpty(System.Configuration.ConfigurationSettings.AppSettings["NCacheServer.EventPriorityRatio"])) { try { _eventPriorityRatio = Convert.ToInt32(System.Configuration.ConfigurationSettings.AppSettings["NCacheServer.EventPriorityRatio"]); } catch (Exception e) { throw new Exception("Invalid value specified for NCacheServer.EventPriorityRatio."); } } if (_eventPriorityRatio <= 0) _eventPriorityRatio = 30; _asyncSendQueue = new Alachisoft.NCache.Common.DataStructures.WeightageBasedPriorityQueue(_eventPriorityRatio); if (!string.IsNullOrEmpty(System.Configuration.ConfigurationSettings.AppSettings["NCacheServer.BulkEventCollectionInterval"])) { try { _bulkEventCollectionInterval = Convert.ToInt32(System.Configuration.ConfigurationSettings.AppSettings["NCacheServer.BulkEventCollectionInterval"]); } catch (Exception e) { throw new Exception("Invalid value specified for NCacheServer.BulkEventCollectionInterval."); } } if (_bulkEventCollectionInterval <= 0) _bulkEventCollectionInterval = 1; _clientSocket = clientSocket; _clientSocketId = new Address(((IPEndPoint)clientSocket.RemoteEndPoint).Address, ((IPEndPoint)clientSocket.RemoteEndPoint).Port).ToString(); }