Beispiel #1
0
 public BTransport(BApiDescriptor apiDesc, BWire wire, BRemoteRegistry remoteRegistry)
 {
     this.apiDesc        = apiDesc;
     this.wire           = wire;
     this.targetId       = new BTargetId();
     this.remoteRegistry = remoteRegistry;
 }
Beispiel #2
0
        public BTransport(BTransport rhs, BTargetId targetId)
        {
            this.apiDesc   = rhs.apiDesc;
            this.wire      = rhs.wire;
            this.targetId  = targetId;
            this.sessionId = rhs.sessionId;
            this.protocol  = rhs.getProtocol();

            // Still connected to the server given by rhs.
            this.connectedServerId = rhs.targetId.getServerId();
        }
        public HTransportFactoryClient(BApiDescriptor apiDesc, BWire wire, int nbOfServerRConns)
        {
            this.transport = new BTransport(apiDesc, wire, null);
            this.nbOfServerRConns = nbOfServerRConns;

            // By default, .NET allows only 2 connections per server.
            // This is not sufficient when sending stream requests. 
            // In this case we need 1 + nbOfServerRConns + number-of-streams connections.
            // Assume here that a requests does not send more than 10 streams. If more streams 
            // should be sent, the .NET option has to be increased.
            int nbConns = 1 + nbOfServerRConns + 10;
            if (System.Net.ServicePointManager.DefaultConnectionLimit < nbConns)
            {
                System.Net.ServicePointManager.DefaultConnectionLimit = nbConns;
            }
        }
Beispiel #4
0
        public HTransportFactoryClient(BApiDescriptor apiDesc, BWire wire, int nbOfServerRConns)
        {
            this.transport        = new BTransport(apiDesc, wire, null);
            this.nbOfServerRConns = nbOfServerRConns;

            // By default, .NET allows only 2 connections per server.
            // This is not sufficient when sending stream requests.
            // In this case we need 1 + nbOfServerRConns + number-of-streams connections.
            // Assume here that a requests does not send more than 10 streams. If more streams
            // should be sent, the .NET option has to be increased.
            int nbConns = 1 + nbOfServerRConns + 10;

            if (System.Net.ServicePointManager.DefaultConnectionLimit < nbConns)
            {
                System.Net.ServicePointManager.DefaultConnectionLimit = nbConns;
            }
        }