示例#1
0
 internal override void Init(NetworkCommon networkCommon)
 {
     {
         NetMsgProcessPluginBase p = GetPlugin((byte)NetProperty.Pong);
         if (p != null)
         {
             NetPingPlugin pingPlugin = (NetPingPlugin)p;
             pingPlugin.Enable = enablePing;
         }
     }
     {
         AutoReconnectPlugin p = GetReconnectPlugin();
         if (p != null)
         {
             p.Enable = enableReconnect;
         }
     }
     base.Init(networkCommon);
 }
示例#2
0
        // Use this for initialization
        internal virtual void Init(NetworkCommon networkCommon)
        {
            foreach (var plugin in plugins)
            {
                plugin.Value.Init(networkCommon);
            }
            AddAllCompressFun();
            foreach (var compress in compressFun)
            {
                compress.Value.Init();
            }

            if (msgEncryption != null)
            {
                msgEncryption.Init(byteOrder);
            }

            if (serializer != null)
            {
                serializer.Init(this);
            }
        }
 public void Init(NetworkCommon networkCommon)
 {
     this.networkCommon = networkCommon;
     OnInit();
 }