zoukankan      html  css  js  c++  java
  • PhotonServer新增应用的配置

    一,如下代码配置

     <MyGameInstance
            MaxMessageSize="512000"
            MaxQueuedDataPerPeer="512000"
            PerPeerMaxReliableDataInTransit="51200"
            PerPeerTransmitRateLimitKBSec="256"
            PerPeerTransmitRatePeriodMilliseconds="200"
            MinimumTimeout="5000"
            MaximumTimeout="30000"
            DisplayName="MyGame"    
            >
        <!-- OverrideApplication表示加载下面定义的Applications的名字如下MyGame1, -->
        <UDPListeners>
          <UDPListener
                    IPAddress="0.0.0.0"
                    Port="5055"
                    OverrideApplication="MyGame1">
          </UDPListener>
        </UDPListeners>
        <TCPListeners>
          <TCPListener
                    IPAddress="0.0.0.0"
                    Port="4530"
                    PolicyFile="Policyassetssocket-policy.xml"
                    InactivityTimeout="10000"
                    OverrideApplication="MyGame1"
                    >
          </TCPListener>
        </TCPListeners>
        <Runtime
                Assembly="PhotonHostRuntime, Culture=neutral"
                Type="PhotonHostRuntime.PhotonDomainManager"
                UnhandledExceptionPolicy="Ignore">
        </Runtime>
    
        <!-- Default表示默认加载的应用 如加载下面Application的MyGame1-->
        <Applications Default="MyGame1">
          
        <!--BaseDirectory文件夹。Assembly程序集。Type那个类为起始类-->
          <Application
                    Name="MyGame1"
                    BaseDirectory="MyGameServer"
                    Assembly="MyGameServer"
                    Type="MyGameServer.MyGameServer"
                    ForceAutoRestart="true"
                    WatchFiles="dll;config"
                    ExcludeFiles="log4net.config">
          </Application>
    
        </Applications>
      </MyGameInstance>

     二,log4net的配置,选择为始终复制,这样才会生成到输出目录

  • 相关阅读:
    this用法
    break/continue的使用
    解决:sql server无法在C盘下创建database/操作系统错误5(拒绝访问)
    (转)科普:SATA、PCIe、AHCI、NVMe
    Java按位取反运算符“~”的工作原理
    <剑指offer> 第12题
    <剑指offer> 第11题
    <剑指offer> 第10题
    <剑指offer> 第9题
    <剑指offer> 第8题
  • 原文地址:https://www.cnblogs.com/May-day/p/9487612.html
Copyright © 2011-2022 走看看