您好:
在程序开发中遇到如下问题:
先请参看代码:
TcpChannel chan1,chan2;
//注册第一个
chan1 = new TcpChannel(8085);
ChannelServices.RegisterChannel(chan1,false);
RemotingConfiguration.RegisterWellKnownServiceType
(typeof(GameManageSystem.GameUser),
"GameUser",
WellKnownObjectMode.Singleton);
//注册第2个
chan2 = new TcpChannel(8086);
ChannelServices.RegisterChannel(chan2,false);
RemotingConfiguration.RegisterWellKnownServiceType
(typeof(GameManageSystem.GameUser),
"GameUser2",
WellKnownObjectMode.Singleton);结果是第一个注册成功,第2个提示我“信道'tcp'已注册”
请问这是什么原因:?
在程序开发中遇到如下问题:
先请参看代码:
TcpChannel chan1,chan2;
//注册第一个
chan1 = new TcpChannel(8085);
ChannelServices.RegisterChannel(chan1,false);
RemotingConfiguration.RegisterWellKnownServiceType
(typeof(GameManageSystem.GameUser),
"GameUser",
WellKnownObjectMode.Singleton);
//注册第2个
chan2 = new TcpChannel(8086);
ChannelServices.RegisterChannel(chan2,false);
RemotingConfiguration.RegisterWellKnownServiceType
(typeof(GameManageSystem.GameUser),
"GameUser2",
WellKnownObjectMode.Singleton);结果是第一个注册成功,第2个提示我“信道'tcp'已注册”
请问这是什么原因:?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货