http://msdn.microsoft.com/en-us/library/system.runtime.remoting.channels.tcp.tcpchannel.aspx
------------------------------------------------------------------------
namespace Server
{
class Program
{
static void Main(string[] args)
{
TcpChannel tcpChannel = new TcpChannel(7777);
ChannelServices.RegisterChannel(tcpChannel, false);
ServerQueue queue = new ServerQueue();
RemotingServices.Marshal(queue, "ServerQueue");
RemotingConfiguration.ApplicationName = "MyRemoteService";
RemotingConfiguration.RegisterWellKnownServiceType(typeof(ServerQueue), "ServerQueue", WellKnownObjectMode.Singleton);
}
}
}
No comments:
Post a Comment