コード例 #1
0
        private TcpQactiveProvider(IPEndPoint endPoint, ITcpQactiveProviderTransportInitializer transportInitializer)
        {
            Contract.Requires(endPoint != null);

            EndPoint = endPoint;
            this.transportInitializer = transportInitializer;
            serverNumber = Interlocked.Increment(ref lastServerNumber);

            if (transportInitializer != null)
            {
                prepareSocket    = transportInitializer.Prepare;
                formatterFactory = () => transportInitializer.CreateFormatter() ?? TcpQactiveDefaults.CreateDefaultFormatter();
            }
            else
            {
                prepareSocket    = Nop.Action;
                formatterFactory = TcpQactiveDefaults.CreateDefaultFormatter;
            }
        }
コード例 #2
0
 public TcpQbservableClient(IPEndPoint endPoint, params Type[] knownTypes)
     : this(endPoint, TcpQactiveDefaults.CreateDefaultFormatter(), knownTypes)
 {
     Contract.Requires(endPoint != null);
 }
コード例 #3
0
 public TcpQbservableClient(IPEndPoint endPoint, LocalEvaluator localEvaluator)
     : this(endPoint, TcpQactiveDefaults.CreateDefaultFormatter(), localEvaluator)
 {
     Contract.Requires(endPoint != null);
     Contract.Requires(localEvaluator != null);
 }
コード例 #4
0
 public TcpQbservableClient(IPEndPoint endPoint)
     : this(endPoint, TcpQactiveDefaults.CreateDefaultFormatter())
 {
     Contract.Requires(endPoint != null);
 }