static void Main(string[] args) { RPCServer.Open("getName2", new Handler()); Console.WriteLine("已启动getName2的服务,按任意键退出"); Console.ReadLine(); RPCServer.Close("getName2"); }
static void Main(string[] args) { RPCServer.Open("TestRPCConcurrent", new Handler()); Console.WriteLine("已启动TestRPCConcurrent的服务,按任意键退出"); Console.ReadLine(); RPCServer.Close("TestRPCConcurrent"); }
private static void CleanupRPCServers() { var services = ServiceAttribute.GetServics(); foreach (var service in services) { RPCServer.Close(service); } }
internal static void Cleanup() { var tips = RemotableAttribute.GetTips(); foreach (var tip in tips) { var methodName = RemoteServiceName.GetObject(tip.RemoteType); RPCServer.Close(methodName); } //取消订阅 CancelEvents(); }