예제 #1
0
파일: Server.cs 프로젝트: kutbidin/CSharp
        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();
        }
예제 #2
0
        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);
        }