helloserver.cs
来自「.net remoting的简单应用 .net remoting的简单应用 」· CS 代码 · 共 21 行
CS
21 行
using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
using Wrox.ProCSharp.Remoting;
namespace Wrox.ProCharp.Remoting
{
class HelloServer
{
static void Main(string[] args)
{
TcpServerChannel channel = new TcpServerChannel(8086);
ChannelServices.RegisterChannel(channel,false);
RemotingConfiguration.RegisterWellKnownServiceType(typeof(Hello), "Hi", WellKnownObjectMode.SingleCall);
System.Console.WriteLine("press to exit");
System.Console.ReadLine();
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?