Beispiel #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="inName"></param>
        /// <param name="inCapacity"></param>
        /// <returns></returns>
        public SharedMemoryController BuildServerController(string inName, long inServerCapacity, long inClientCapacity)
        {
            SharedMemoryController result = new SharedMemoryController();

            //:::::::::::::::::::::::::::::::::::::::::

            result.InitServer(SharedMemoryType.Memory, inName, inServerCapacity, inClientCapacity);

            //:::::::::::::::::::::::::::::::::::::::::

            return(result);
        }
Beispiel #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="inName"></param>
        /// <param name="inCapacity"></param>
        /// <returns></returns>
        public SharedMemoryController BuildClientControllerMemMappedFile(string inName, long inServerCapacity, long inClientCapacity)
        {
            SharedMemoryController result = new SharedMemoryController();

            //:::::::::::::::::::::::::::::::::::::::::

            result.InitClient(SharedMemoryType.File, inName, inServerCapacity, inClientCapacity);

            //:::::::::::::::::::::::::::::::::::::::::

            return(result);
        }
Beispiel #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="inName"></param>
        /// <param name="inCapacity"></param>
        /// <returns></returns>
        public SharedMemoryController BuildClientController(string inName, long inServerCapacity, long inClientCapacity)
        {
            SharedMemoryController result = new SharedMemoryController();

            //:::::::::::::::::::::::::::::::::::::::::

            if (!result.InitClient(SharedMemoryType.Memory, inName, inServerCapacity, inClientCapacity))
            {
                result = null;
                //GC.Collect();
            }

            //:::::::::::::::::::::::::::::::::::::::::

            return(result);
        }