Beispiel #1
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        public IpcClient()
        {
            // クライアントチャンネルの生成
            IpcClientChannel channel = new IpcClientChannel();

            // チャンネルを登録
            ChannelServices.RegisterChannel(channel, true);

            // リモートオブジェクトを取得
            RemoteObject = Activator.GetObject(typeof(IpcRemoteObj), "ipc://" + IpcRemoteObj.ipcAddr + "/" + IpcRemoteObj.ipcAddrCom) as IpcRemoteObj;
        }
Beispiel #2
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        public IpcServer()
        {
            // サーバーチャンネルの生成
            IpcServerChannel channel = new IpcServerChannel(IpcRemoteObj.ipcAddr);

            // チャンネルを登録
            ChannelServices.RegisterChannel(channel, true);

            // リモートオブジェクトを生成して公開
            RemoteObject = new IpcRemoteObj();
            RemotingServices.Marshal(RemoteObject, IpcRemoteObj.ipcAddrCom, typeof(IpcRemoteObj));
        }
        /// <summary>
        /// コンストラクタ
        /// </summary>
        public IpcServer()
        {
            // サーバーチャンネルの生成
            IpcServerChannel channel = new IpcServerChannel(IpcRemoteObj.ipcAddr);

            // チャンネルを登録
            ChannelServices.RegisterChannel(channel, true);

            // リモートオブジェクトを生成して公開
            RemoteObject = new IpcRemoteObj();
            RemotingServices.Marshal(RemoteObject, IpcRemoteObj.ipcAddrCom, typeof(IpcRemoteObj));
        }