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="Policy\assets\socket-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的配置,选择为始终复制,这样才会生成到输出目录

 

转载于:https://www.cnblogs.com/May-day/p/9487612.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值