remoteing 多tcp通道注册

 

单通道注册
    TcpChannel tcpChan = new TcpChannel(remotePort);
    tcpChannelList.Add(tcpChan);
    ChannelServices.RegisterChannel(tcpChan, false);

多tcp通道注册
    为每个 Channel 取一个不同的名字, channels 下是可以配置多个 channel 的
    TcpServerChannel tcpChannel = new TcpServerChannel( "tcpChannel" , 4000);
    RemotingConfiguration.RegisterWellKnownServiceType( typeof (Achieve), "Service" , WellKnownObjectMode.SingleCall);
    ChannelServices.RegisterChannel(tcpChannel, false );

你可能感兴趣的:(remoteing 多tcp通道注册)