private void LoadPacketAnalyzer(string name) { Type type = null; if (!string.IsNullOrEmpty(name)) { type = Type.GetType(name); if (type != null) { if (type.GetInterface("EC.IPacketAnalyzer") == null) { "{0} type not is packet analyzer".Log4Error(name); type = null; } } else { "{0} packet analyzer notfound".Log4Error(name); } } if (type == null) { PacketAnalyzer = new Implement.ProtobufPacket(); } else { PacketAnalyzer = (IPacketAnalyzer)Activator.CreateInstance(type); } }
private void initDefault() { PacketMaxsize = 1024 * 1024 * 50; Port = 10034; Http = "http://localhost:10035/"; PacketAnalyzer = new Implement.ProtobufPacket(); MessageCenter = new Remoting.MessageCenter(); }