The main interface between the proxy server and the loaded plugins
コード例 #1
0
        /// <summary>
        ///   Creates a new instance of the ProxyServer class.
        /// </summary>
        public ProxyServer()
        {
            _logger = LogManager.GetLogger("Proxy Server");

            _logger.Info("Starting MineProxy.Net " + Assembly.GetExecutingAssembly ().GetName ().Version);

            ReadConfig ();
            _pluginManager = new PluginManager(this);
            _openConnection = new SynchronizedCollection<ProxyConnection> ();
            _connectedUsers = new SynchronizedCollection<ProxyConnection> ();
        }
コード例 #2
0
 public override void Load(PluginManager manager)
 {
     throw new NotSupportedException ();
 }
コード例 #3
0
 public override void Load(PluginManager manager)
 {
     _manager = manager;
     _listener = new ServerChangePacketListener(this);
     _manager.RegisterPacketListener(_listener);
 }
コード例 #4
0
 public override void Load(PluginManager manager)
 {
     _logger.Info("Hello, World!");
 }
コード例 #5
0
 /// <summary>
 ///   This message is being called once after instantiating the plugin. It is used to initialize the plugin, 
 ///   register packet listeners, or storing references to the plugin manager, or other relevant parts of the proxy server
 /// </summary>
 /// <param name="manager"> The plugin manager which loaded the plugin </param>
 public abstract void Load(PluginManager manager);