public DistSession GetSession(string sessionName, bool create = false, bool global = false, ServerPriority prio = ServerPriority.PRIO_NORMAL)
 {
     return(manager.DistSessionInstanceManager.GetSession(DistClient_getSession(GetNativeReference(), sessionName, create, global, prio)));
 }
 private static extern IntPtr DistClient_getSession(IntPtr client, string sessionName, bool create, bool global, ServerPriority prio);
Beispiel #3
0
 private static extern IntPtr DistManager_getSession(IntPtr manager, string sessionName, bool create, bool global, ServerPriority prio);
Beispiel #4
0
            public DistSession GetSession(string sessionName, bool create = false, bool global = false, ServerPriority prio = ServerPriority.PRIO_NORMAL)
            {
                IntPtr s = DistManager_getSession(GetNativeReference(), sessionName, create, global, prio);

                DistSession session = ReferenceDictionary <DistSession> .GetObject(s);

                if (session == null)
                {
                    session = new DistSession(s);
                }

                return(session);
            }
Beispiel #5
0
    internal VirtualServer Add(string Host, string Username = "", string Password = "", int Port = 119, int MaxConnections = 1, bool SSL = false, ServerPriority Priority = ServerPriority.Default)
    {
        VirtualServer SrvInfo = new VirtualServer(Connections, Host, Username, Password, Port, MaxConnections, SSL, Priority);

        if (!zServers.Add(SrvInfo))
        {
            return(null);
        }

        for (int iC = 0; iC < SrvInfo.Allowed; iC++)
        {
            Connections.Add(SrvInfo.ID);
        }

        return(SrvInfo);
    }
Beispiel #6
0
    internal VirtualServer(Connections lConnections, string Host, string Username = "", string Password = "", int Port = 119, int Connections = 1, bool SSL = false, ServerPriority Priority = ServerPriority.Default)
    {
        zSSL         = SSL;
        zHost        = Host;
        zPort        = Port;
        zCon         = lConnections;
        zPriority    = Priority;
        zConnections = Connections;

        if (Username != null)
        {
            zUsername = Username;
        }
        else
        {
            zUsername = "";
        };
        if (Password != null)
        {
            zPassword = Password;
        }
        else
        {
            zPassword = "";
        };
    }
Beispiel #7
0
        //internal VirtualServer Get(int ID) { lock (zServers) { return zServers.Item(ID); } }

        public int Add(string Host, string Username = "", string Password = "", int Port = 119, int Connections = 1, bool SSL = false, ServerPriority Priority = ServerPriority.Default)
        {
            lock (zServers)
            {
                VirtualServer vSched = zServers.Add(Host, Username, Password, Port, Connections, SSL, Priority);
                if (vSched == null)
                {
                    return(-1);
                }
                return(vSched.ID);
            }
        }