Beispiel #1
0
        public Accountx(string fileName)
        {
            this.accounts1 = new ThreadSafe.Dictionary <int, IAccount>();
            this.accounts2 = new ThreadSafe.Dictionary <string, IAccount>();

            this.files = new AccountFiles(fileName, ReadAccount);
            this.files.ReadAllFiles();
        }
Beispiel #2
0
		public Accountx(string fileName)
		{
			this.accounts1 = new ThreadSafe.Dictionary<int, IAccount>();
			this.accounts2 = new ThreadSafe.Dictionary<string, IAccount>();

			this.files = new AccountFiles(fileName, ReadAccount);
			this.files.ReadAllFiles();
		}
        public DigestAuthentication(IAccounts accounts, IUserz userz, bool isAuthIntEnabled)
        {
            this.accounts         = accounts;
            this.userz            = userz;
            this.isAuthIntEnabled = isAuthIntEnabled;

            authStates = new ThreadSafe.Dictionary <int, AuthState>(new Dictionary <int, AuthState>(16384));           // vf Int32Compa...
            timer      = new Timer(RemoveExpiredNonce, null, 0, NonceLifeCheckInterval);
        }
        public SipMicrosoftAuthentication(AuthSchemes scheme, IAccounts accounts, IUserz userz)
        {
            this.scheme   = scheme;
            this.accounts = accounts;
            this.userz    = userz;

            this.connectingAssociations = new ThreadSafe.Dictionary <int, SecurityAssociation>(new Dictionary <int, SecurityAssociation>());

            this.timer      = new Timer(RemoveExpiredSecurityAssociationsTimer, null, 0, 60 * 1000);
            this.credHandle = Sspi.SafeAcquireCredentialsHandle(scheme.ToString(), CredentialUse.SECPKG_CRED_BOTH);
        }
Beispiel #5
0
		public CsvUsers(string fileName)
		{
			syncs = new ReaderWriterLockSlim[maxSync];
			for (int i = 0; i < syncs.Length; i++)
				syncs[i] = new ReaderWriterLockSlim();

			accounts = new ThreadSafe.Dictionary<int, Dictionary<string, CsvUser>>(1024);

			files = new AccountFiles(fileName, ReadUsers);
			files.ReadAllFiles();
		}
Beispiel #6
0
		public LocationService()
		{
			this.ContactAddedHandler = ContactAddedHandlerInternal;
			this.ContactRemovedHandler = ContactRemovedHandlerInternal;

			this.scheme = System.Text.Encoding.UTF8.GetBytes(@"sip");
			this.timer = new MultiTimer<ByteArrayPart>(RemoveExpiredBindings, 16384,
				false, ByteArrayPartEqualityComparer.GetStaticInstance());
			this.bindingsByAor = new Dictionary<ByteArrayPart, Bindings>();
			this.bindingsByConnectionId = new ThreadSafe.Dictionary<int, ByteArrayPart>(16384);
			this.sync = timer;
		}
Beispiel #7
0
        public LocationService()
        {
            this.ContactAddedHandler   = ContactAddedHandlerInternal;
            this.ContactRemovedHandler = ContactRemovedHandlerInternal;

            this.scheme = System.Text.Encoding.UTF8.GetBytes(@"sip");
            this.timer  = new MultiTimer <ByteArrayPart>(RemoveExpiredBindings, 16384,
                                                         false, ByteArrayPartEqualityComparer.GetStaticInstance());
            this.bindingsByAor          = new Dictionary <ByteArrayPart, Bindings>();
            this.bindingsByConnectionId = new ThreadSafe.Dictionary <int, ByteArrayPart>(16384);
            this.sync = timer;
        }
Beispiel #8
0
        public CsvUsers(string fileName)
        {
            syncs = new ReaderWriterLockSlim[maxSync];
            for (int i = 0; i < syncs.Length; i++)
            {
                syncs[i] = new ReaderWriterLockSlim();
            }

            accounts = new ThreadSafe.Dictionary <int, Dictionary <string, CsvUser> >(1024);

            files = new AccountFiles(fileName, ReadUsers);
            files.ReadAllFiles();
        }
        static SipMicrosoftAuthentication()
        {
            auth         = new ByteArrayPart(@"auth");
            realm        = new ByteArrayPart(@"OfficeSIP Server");
            errors       = CreateErrorMessages();
            maxTokenSize = GetMaxTokenSizes();
            opaqueCount  = Environment.TickCount * 17;

            IsSecurityAssociationExpired1 = (opaque, sa) => { return(sa.IsExpired); };
            SecurityAssociationRemoved1   = (opaque, sa) => { sa.Dispose(); };
            SecurityAssociationFactory1   = (opaque, scheme, targetname) => { return(new SecurityAssociation(opaque, scheme, targetname)); };
            IsSecurityAssociationExpired2 = (epid, sa) => { return(sa.IsExpired); };
            SecurityAssociationRemoved2   = (epid, sa) => { sa.Dispose(); };

            authorizedAssociations = new ThreadSafe.Dictionary <string, SecurityAssociation>(new Dictionary <string, SecurityAssociation>());
        }
Beispiel #10
0
        public SimpleModule(IEqualityComparer <string> comparer)
        {
            int capacity = 16384;

            InvalidEtag = int.MinValue;

            publications = new ThreadSafe.Dictionary <string, Publication>(
                new Dictionary <string, Publication>(comparer));

            publicationTimer = new MultiTimer <PublicationExpiresKey>(
                PulicationExpired, capacity, true,
                new PublicationExpiresKeyEqualityComparer());

            subscriptionTimer = new MultiTimer <SubscriptionExpiresKey>(
                SubscriptionExpired, capacity, true,
                new SubscriptionExpiresKeyEqualityComparer());
        }
Beispiel #11
0
        public ProxyServerTU(ILocationService locationService, ITrunkManager trunkManager, int delayTimerC, IAccounts accounts)
        {
            this.IsOfficeSIPFiletransferEnabled = true;

            this.locationService = locationService;
            this.trunkManager    = trunkManager;
            this.accounts        = accounts;

            this.requestProducer = new ProducedRequest(this)
            {
                IncomingResponse = ProccessResponse,
                TransportError   = ProccessTransportError,
                ProduceAck       = ProduceAck,
            };

            this.clientTransactionIds = new ThreadSafe.Dictionary <int, int>(new Dictionary <int, int>(16384 * 3));
            this.requestProxyes       = new ThreadSafe.Dictionary <int, RequestProxy>(new Dictionary <int, RequestProxy>(16384));

            this.timerC = new MultiTimerEx <ServerClientId>(TimerC, 16384, delayTimerC);
        }
Beispiel #12
0
		public DialogManager()
		{
			dictionary = new ThreadSafe.Dictionary<ByteArrayPart, Dialog>(
				new Dictionary<ByteArrayPart, Dialog>(ByteArrayPartEqualityComparer.GetStaticInstance()));
		}
		public DigestAuthentication(IAccounts accounts, IUserz userz, bool isAuthIntEnabled)
		{
			this.accounts = accounts;
			this.userz = userz;
			this.isAuthIntEnabled = isAuthIntEnabled;

			authStates = new ThreadSafe.Dictionary<int, AuthState>(new Dictionary<int, AuthState>(16384)); // vf Int32Compa...
			timer = new Timer(RemoveExpiredNonce, null, 0, NonceLifeCheckInterval);
		}
Beispiel #14
0
 public DialogManager()
 {
     dictionary = new ThreadSafe.Dictionary <ByteArrayPart, Dialog>(
         new Dictionary <ByteArrayPart, Dialog>(ByteArrayPartEqualityComparer.GetStaticInstance()));
 }