public Result(SynchronizationContext callbackContext, int maxProcessValue = 1) { MaxProcessValue = maxProcessValue; _context = callbackContext; _callbackThreadType = _context == null ? CallbackThreadType.ThreadPool : CallbackThreadType.SynchronizationContext; Status = ResultStatus.InProgress; }
public BaseSocketConnectionHost(HostType hostType, CallbackThreadType callbackThreadtype, ISocketService socketService, DelimiterType delimiterType, byte[] delimiter, int socketBufferSize, int messageBufferSize, int idleCheckInterval, int idleTimeOutValue) { context = new SocketProviderContext { Active = false, SyncActive = new object(), SocketCreators = new List<BaseSocketConnectionCreator>(), SocketConnections = new Dictionary<long, BaseSocketConnection>(), BufferManager = BufferManager.CreateBufferManager(0, messageBufferSize), SocketService = socketService, IdleCheckInterval = idleCheckInterval, IdleTimeOutValue = idleTimeOutValue, CallbackThreadType = callbackThreadtype, DelimiterType = delimiterType, Delimiter = delimiter, DelimiterEncrypt = new byte[] { 0xFE, 0xDC, 0xBA, 0x98, 0xBA, 0xDC, 0xFE }, MessageBufferSize = messageBufferSize, SocketBufferSize = socketBufferSize, HostType = hostType }; fSocketConnectionsSync = new ReaderWriterLockSlim(); fWaitCreatorsDisposing = new ManualResetEvent(false); fWaitConnectionsDisposing = new ManualResetEvent(false); fWaitThreadsDisposing = new ManualResetEvent(false); }
public Result(int maxProcessValue = 1) { MaxProcessValue = maxProcessValue; _context = null; _callbackThreadType = CallbackThreadType.UpdatedThread; Status = ResultStatus.InProgress; }
public SocketServer(CallbackThreadType callbackThreadType, ISocketService socketService, DelimiterType delimiterType, byte[] delimiter, int socketBufferSize, int messageBufferSize, int idleCheckInterval, int idleTimeOutValue) : base(HostType.htServer, callbackThreadType, socketService, delimiterType, delimiter, socketBufferSize, messageBufferSize, idleCheckInterval, idleTimeOutValue) { //----- }
public SocketServer(CallbackThreadType callbackThreadType, ISocketService socketService, DelimiterType delimiterType, byte[] delimiter, int socketBufferSize, int messageBufferSize) : base(HostType.htServer, callbackThreadType, socketService, delimiterType, delimiter, socketBufferSize, messageBufferSize, 0, 0) { //----- }
public SocketServer(CallbackThreadType callbackThreadType, ISocketService socketService, DelimiterType delimiterType, byte[] delimiter) : base(HostType.htServer, callbackThreadType, socketService, delimiterType, delimiter, 2048, 2048, 0, 0) { //----- }
public SocketServer(CallbackThreadType callbackThreadType, ISocketService socketService) : base(HostType.htServer, callbackThreadType, socketService, DelimiterType.dtNone, null, 2048, 2048, 0, 0) { //----- }
public SocketClient(CallbackThreadType callbackThreadType, ISocketService socketService, DelimiterType delimiterType, byte[] delimiter, int socketBufferSize, int messageBufferSize, int idleCheckInterval, int idleTimeOutValue) : base(HostType.htClient, callbackThreadType, socketService, delimiterType, delimiter, socketBufferSize, messageBufferSize, idleCheckInterval, idleTimeOutValue) { //----- }
public SocketClient(CallbackThreadType callbackThreadType, ISocketService socketService, DelimiterType delimiterType, byte[] delimiter, int socketBufferSize, int messageBufferSize) : base(HostType.htClient, callbackThreadType, socketService, delimiterType, delimiter, socketBufferSize, messageBufferSize, 0, 0) { //----- }
public SocketClient(CallbackThreadType callbackThreadType, ISocketService socketService, DelimiterType delimiterType, byte[] delimiter) : base(HostType.htClient, callbackThreadType, socketService, delimiterType, delimiter, 2048, 2048, 0, 0) { //----- }
public SocketClient(CallbackThreadType callbackThreadType, ISocketService socketService) : base(HostType.htClient, callbackThreadType, socketService, DelimiterType.dtNone, null, 2048, 2048, 0, 0) { //----- }