public Server() { InitializeComponent(); _atmStatus = new ATMInfoProvider(); TcpChannel listenerCh = new TcpChannel(); ChannelServices.RegisterChannel(listenerCh, true); _dataSharer = (DataSharingObject)Activator.GetObject(typeof(DataSharingObject), "tcp://localhost:8090/Server"); reportTimer.Start(); }
public Monitor() { InitializeComponent(); _dataSharer = new DataSharingObject(); _atmInfo = Cache.GetInstance()._atmInfo; TcpChannel channel = new TcpChannel(8090); ChannelServices.RegisterChannel(channel, true); RemotingConfiguration.RegisterWellKnownServiceType(typeof(DataSharingObject), "Server", WellKnownObjectMode.SingleCall); Cache.Attach(this); }