ServerCoord(int port) { _port = port; _channel = new TcpChannel(_port); ChannelServices.RegisterChannel(_channel, true); _rServer = new RemoteServerCoord(port); try { RemotingServices.Marshal(_rServer, "Server", typeof(RemoteServerCoord)); } catch (Exception e) { throw e; } }
public static void Init() { _channel = new TcpChannel(0); ChannelServices.RegisterChannel(_channel, true); //InitializeRemoteMasterServer(); _rMasterServer = (RemoteMasterServer)Activator.GetObject( typeof(RemoteMasterServer), "tcp://localhost:8086/MasterServer"); _rServerCoord = (RemoteServerCoord)Activator.GetObject( typeof(RemoteServerCoord), _rMasterServer.getServerCoordUrl()); }