IpcClientChannel クラスとは? わかりやすく解説

IpcClientChannel クラス

メモ : このクラスは、.NET Framework version 2.0新しく追加されたものです。

IPC プロトコル使用してメッセージ送信するリモート呼び出しクライアント チャネル実装ます。

名前空間: System.Runtime.Remoting.Channels.Ipc
アセンブリ: System.Runtime.Remoting (system.runtime.remoting.dll 内)
構文構文

Public Class IpcClientChannel
    Implements IChannelSender, IChannel, ISecurableChannel
Dim instance As IpcClientChannel
public class IpcClientChannel : IChannelSender,
 IChannel, ISecurableChannel
public ref class IpcClientChannel : IChannelSender,
 IChannel, ISecurableChannel
public class IpcClientChannel implements IChannelSender,
 IChannel, 
    ISecurableChannel
public class IpcClientChannel implements IChannelSender,
 IChannel, 
    ISecurableChannel
解説解説

チャネルは、リモート呼び出し転送するために .NET Frameworkリモート処理インフラストラクチャによって使用されます。クライアントリモート オブジェクト呼び出すと、この呼び出しは、クライアント チャネルからサーバー チャネル送信されるメッセージとしてシリアル化されますメッセージ受信後、このメッセージが逆シリアル化され、処理されます。戻り値は、サーバー チャネルからクライアント チャネル送信されます。

IpcClientChannel クラスは、Windowsプロセス間通信 (IPC) システム使用して、同じコンピュータ上のアプリケーション ドメイン間でメッセージ転送します。同じコンピュータ上のアプリケーション ドメイン間で通信する場合IPC チャネルTCP チャネルHTTP チャネルよりもはるかに高速です。

クライアント側メッセージ追加的な処理を実行するには、IpcClientChannel オブジェクトによって処理されるすべてのメッセージ通過する IClientChannelSinkProvider インターフェイス実装指定します

既定では、IpcClientChannel クラスバイナリ フォーマッタ使用してすべてのメッセージシリアル化ます。

IpcClientChannel オブジェクトには、構成ファイル使用して (静的 RemotingConfiguration.Configure メソッド呼び出す)、またはプログラムで (IpcClientChannel コンストラクタに IDictionary コレクションを渡す)、実行時設定できる構成プロパティ関連付けられています。これらの構成プロパティ一覧については、IpcClientChannel コンストラクタトピック参照してください

使用例使用例

IpcClientChannel クラス使用するコード例次に示します

using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Ipc;


public class Client
{
    public static void Main
 ()
    {
        IpcClientChannel clientChannel = new IpcClientChannel();
        ChannelServices.RegisterChannel(clientChannel);

        RemotingConfiguration.RegisterWellKnownClientType( typeof(Counter) , "ipc://remote/counter"
 );

        Counter counter = new Counter();
        Console.WriteLine("This is call number {0}.", counter.Count);
    }

}
#using <System.Runtime.Remoting.dll>
#using <System.dll>
#using <Counter.dll>

using namespace System;
using namespace System::Runtime::Remoting;
using namespace System::Runtime::Remoting::Channels;
using namespace System::Runtime::Remoting::Channels::Ipc;

public ref class Client
{
public:
   void ClientTest()
   {
      IpcClientChannel^ clientChannel = gcnew IpcClientChannel;
      ChannelServices::RegisterChannel( clientChannel );

      RemotingConfiguration::RegisterWellKnownClientType( Counter::typeid, L"ipc://remote/counter"
 );
      Counter^ counter = gcnew Counter;
      Console::WriteLine( L"This is call number {0}.", counter->Count
 );
   }
};

int main()
{
   Client^ c = gcnew Client;
   c->ClientTest();
}
import System.*;
import System.Runtime.Remoting.*;
import System.Runtime.Remoting.Channels.*;
import System.Runtime.Remoting.Channels.Ipc.*;

public class Client
{
    public static void main(String[]
 args)
    {
        IpcClientChannel clientChannel = new IpcClientChannel();
        ChannelServices.RegisterChannel(clientChannel);

        RemotingConfiguration.RegisterWellKnownClientType(
            Counter.class.ToType(), "ipc://remote/counter");
        Counter counter = new Counter();
        Console.WriteLine("This is call number {0}.", 
            System.Convert.ToString(counter.get_Count()));
    } //main
} //Client 

上記コードでは、次のリモート オブジェクト使用してます。

using System;

public class Counter : MarshalByRefObject {

  private int count = 0;

  public int Count { get
 {
    return(count++);
  } }

}
import System.*;

public class Counter extends MarshalByRefObject
{
    private int count = 0;

    /** @property 
     */
    public int get_Count()
    {
        return count++;
    } //get_Count
} //Counter 

このオブジェクトリモート公開するサーバー例については、IpcServerChannel のトピック参照してください

継承階層継承階層
System.Object
  System.Runtime.Remoting.Channels.Ipc.IpcClientChannel
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
IpcClientChannel メンバ
System.Runtime.Remoting.Channels.Ipc 名前空間


このページでは「.NET Framework クラス ライブラリ リファレンス」からIpcClientChannel クラスを検索した結果を表示しています。
Weblioに収録されているすべての辞書からIpcClientChannel クラスを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からIpcClientChannel クラス を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「IpcClientChannel クラス」の関連用語

IpcClientChannel クラスのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



IpcClientChannel クラスのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS