Server.cs
上传用户:jasonxu888
上传日期:2007-03-28
资源大小:4316k
文件大小:1k
- using System;
- using System.Runtime.Remoting;
- using System.Threading;
- using General;
- namespace Server
- {
- public class SomeSAO: MarshalByRefObject, IMySAO
- {
- public void DoSomething()
- {
- // simulating a long-running query
- Console.WriteLine("DoSomething() called");
- Thread.Sleep(5000);
- Console.WriteLine("DoSomething() done");
- }
- }
- class ServerStartup
- {
- static void Main(string[] args)
- {
- String filename = "server.exe.config";
- RemotingConfiguration.Configure(filename);
- Console.WriteLine ("Server started, press <return> to exit.");
- Console.ReadLine();
- }
- }
- }