Beispiel #1
0
 public HttpServerTransactionDelegateWrapper(IHttpServerTransactionDelegate realDelegate,
                                             IConnectionWatcher connectionWatcher,
                                             ISocket socket)
 {
     _realDelegate      = realDelegate;
     _connectionWatcher = connectionWatcher;
     _socket            = socket;
 }
 public HttpServerTransactionDelegateWrapper(IHttpServerTransactionDelegate realDelegate, 
                                      IConnectionWatcher connectionWatcher,
                                      ISocket socket)
 {
     _realDelegate = realDelegate;
     _connectionWatcher = connectionWatcher;
     _socket = socket;
 }
Beispiel #3
0
 public static IConnectionWatcher OnRemoved(this IConnectionWatcher watcher, Action <ITrafficRow> onRemoved)
 {
     if (onRemoved is null)
     {
         return(watcher);
     }
     watcher.ConnectionListChanged += (sender, e) => onRemoved?.Invoke((e as ConnectionListRemovedEventArgs).Removed);
     return(watcher);
 }
 public static ClientHolderState CreateActive(
     Lazy <ZooKeeperNetExClient> client,
     IConnectionWatcher connectionWatcher,
     ConnectionState connectionState,
     string connectionString,
     ZooKeeperClientSettings settings) =>
 new ClientHolderState(
     false,
     connectionState.IsConnected(settings.CanBeReadOnly),
     client,
     connectionWatcher,
     connectionState,
     connectionString,
     TimeBudget.StartNew(settings.Timeout));
 private ClientHolderState(
     bool isSuspended,
     bool isConnected,
     Lazy <ZooKeeperNetExClient> client,
     IConnectionWatcher connectionWatcher,
     ConnectionState connectionState,
     string connectionString,
     TimeBudget timeBeforeReset)
 {
     IsSuspended       = isSuspended;
     IsConnected       = isConnected;
     lazyClient        = client;
     ConnectionWatcher = connectionWatcher;
     ConnectionState   = connectionState;
     ConnectionString  = connectionString;
     TimeBeforeReset   = timeBeforeReset;
 }
Beispiel #6
0
 public static IConnectionWatcher OnUpdated(this IConnectionWatcher watcher, Action <(ITrafficRow Origin, ITrafficRow Updated)> onUpdated)
Beispiel #7
0
 public IosHttpServerDelegate(IHttpRequestDelegate requestDelegate, IConnectionWatcher connWatcher)
 {
     this.requestDelegate = requestDelegate;
     this.responseFactory = new HttpResponseDelegateFactory();
     this.connWatcher=connWatcher;
 }
Beispiel #8
0
 public IosHttpServerFactory(IServerFactory serverFactory, IConnectionWatcher connWatcher)
 {
     this.serverFactory = serverFactory;
     this.connWatcher = connWatcher;
 }
Beispiel #9
0
 public static IServer CreateIosHttp(this IServerFactory factory, IHttpRequestDelegate channel, IConnectionWatcher connWatcher, IScheduler scheduler)
 {
     var f = new IosHttpServerFactory(factory, connWatcher);
     return f.Create(channel, scheduler);
 }
 public IosHttpServerDelegate(IHttpRequestDelegate requestDelegate, IConnectionWatcher connWatcher)
 {
     this.requestDelegate = requestDelegate;
     this.responseFactory = new HttpResponseDelegateFactory();
     this.connWatcher     = connWatcher;
 }
 public IosHttpServerFactory(IServerFactory serverFactory, IConnectionWatcher connWatcher)
 {
     this.serverFactory = serverFactory;
     this.connWatcher   = connWatcher;
 }
        public static IServer CreateIosHttp(this IServerFactory factory, IHttpRequestDelegate channel, IConnectionWatcher connWatcher, IScheduler scheduler)
        {
            var f = new IosHttpServerFactory(factory, connWatcher);

            return(f.Create(channel, scheduler));
        }