コード例 #1
0
        static BarebonesTopology()
        {
            var config = new ConnectionConfig();

            ReliableChannel          = config.AddChannel(QosType.Reliable);
            UnreliableChannel        = config.AddChannel(QosType.Unreliable);
            ReliableSequencedChannel = config.AddChannel(QosType.ReliableSequenced);

            Topology = new HostTopology(config, 5000);
        }
コード例 #2
0
        static StackObject *Ctor_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Int32 maxDefaultConnections = ptr_of_this_method->Value;
            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.Networking.ConnectionConfig defaultConfig = (UnityEngine.Networking.ConnectionConfig) typeof(UnityEngine.Networking.ConnectionConfig).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = new UnityEngine.Networking.HostTopology(defaultConfig, maxDefaultConnections);

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
コード例 #3
0
        static StackObject *AddSpecialConnectionConfig_11(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Networking.ConnectionConfig config = (UnityEngine.Networking.ConnectionConfig) typeof(UnityEngine.Networking.ConnectionConfig).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);
            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.Networking.HostTopology instance_of_this_method;
            instance_of_this_method = (UnityEngine.Networking.HostTopology) typeof(UnityEngine.Networking.HostTopology).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.AddSpecialConnectionConfig(config);

            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value      = result_of_this_method;
            return(__ret + 1);
        }
コード例 #4
0
        /// <summary>
        /// Get the Unity Networking ConnectionConfig this ConnectionConfig represents
        /// </summary>
        /// <returns>A connection config with the specified properties</returns>
        public UnityEngine.Networking.ConnectionConfig GetConnectionConfiguration()
        {
            var connectionConfig = new UnityEngine.Networking.ConnectionConfig();

            connectionConfig.AckDelay = this.AcknowledgmentDelay;
            connectionConfig.AllCostTimeout = this.AllCostTimeout;
            connectionConfig.ConnectTimeout = this.ConnectTimeout;
            connectionConfig.DisconnectTimeout = this.DisconnectTimeout;
            connectionConfig.FragmentSize = this.FragmentSize;
            connectionConfig.IsAcksLong = this.Use64BitAcknowledgments;
            connectionConfig.MaxCombinedReliableMessageCount = this.MaxCombinedReliableMessageCount;
            connectionConfig.MaxCombinedReliableMessageSize = this.MaxCombinedReliableMessageSize;
            connectionConfig.MaxConnectionAttempt = this.MaxConnectionAttempt;
            connectionConfig.MaxSentMessageQueueSize = this.MaxSentMessageQueueSize;
            connectionConfig.MinUpdateTimeout = this.MinUpdateTimeout;
            connectionConfig.NetworkDropThreshold = this.NetworkDropThreshold;
            connectionConfig.OverflowDropThreshold = this.OverflowDropThreshold;
            connectionConfig.PacketSize = this.PacketSize;
            connectionConfig.PingTimeout = this.PingTimeout;
            connectionConfig.ReducedPingTimeout = this.ReducedPingTimeout;
            connectionConfig.ResendTimeout = this.ResendTimeout;

            return connectionConfig;
        }