zoukankan      html  css  js  c++  java
  • SuperSocket命令程序集定义

    是的,SuperSocket是用反射来查找哪些公开的类实现了基本的命令接口,但是它只在你的AppServer类定义的程序集中查找。

    举例来说, 你的 AppServer 定义在程序集 GameServer.dll 中, 但是你的 ADD 命令是定义在程序集 BasicModules.dll 中:

    GameServer.dll

        + MyGameServer.cs

    BasicModules.dll

        + ADD.cs

    默认的, 命令 "ADD" 将不会被加载到游戏服务器实例。 如果你想要加载该命令, 你如要在配置中添加程序集 BasicModules.dll 到命令程序集列表之中:

    <?xml version="1.0" encoding="utf-8" ?>

    <configuration>

        <configSections>

            <section name="superSocket" type="SuperSocket.SocketEngine.Configuration.SocketServiceConfig, SuperSocket.SocketEngine"/>

        </configSections>

        <appSettings>

            <add key="ServiceName" value="BroardcastService"/>

        </appSettings>

        <superSocket>

            <servers>

                <server name="SampleServer"

                        serverType="GameServer.MyGameServer, GameServer"

                        ip="Any" port="2012">

                  <commandAssemblies>

                    <add assembly="BasicModules"></add>

                  </commandAssemblies>

                </server>

            </servers>

        </superSocket>

        <startup>

            <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />

        </startup>

    </configuration>

    当然你也可以在配置中添加多个命令程序集。

  • 相关阅读:
    java获取web项目下文件夹的路径方法
    The method setCharacterEncoding(String) is undefined for the type HttpServletResponse
    java获取windows和linux下本机ip通用方法
    mysql慢查询日志查找与分析
    struts1 action之间的跳转
    jquery的tap会执行2次的替换办法
    Win7下如何安装切换jdk7和jdk8
    elasticdump
    python hive.py
    Hdfs数据备份
  • 原文地址:https://www.cnblogs.com/fanweisheng/p/11126775.html
Copyright © 2011-2022 走看看