12345678910111213141516171819202122 |
- using Hprose.RPC;
- using PackageInterface;
- using System;
- using System.Net;
- namespace PackageServer
- {
- class Program
- {
- static void Main(string[] args)
- {
- var service = new Service();
- service.AddInstanceMethods(new PackageManager(), nameof(IPackageManager));
- var httpServer = new HttpListener();
- httpServer.Prefixes.Add("http://*:10100/");
- httpServer.Start();
- service.Bind(httpServer);
- Console.WriteLine("PackageServer started.");
- Console.ReadLine();
- }
- }
- }
|