IpcChannel Constructeurs
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Initialise une nouvelle instance de la classe IpcChannel.
Surcharges
| Nom | Description |
|---|---|
| IpcChannel() |
Initialise une nouvelle instance de la IpcChannel classe, activant uniquement un canal client et non un canal serveur. |
| IpcChannel(String) |
Initialise une nouvelle instance de la IpcChannel classe avec un canal de serveur qui écoute sur le port IPC spécifié. |
| IpcChannel(IDictionary, IClientChannelSinkProvider, IServerChannelSinkProvider) |
Initialise une nouvelle instance de la IpcChannel classe avec les propriétés et récepteurs de configuration spécifiés. |
| IpcChannel(IDictionary, IClientChannelSinkProvider, IServerChannelSinkProvider, CommonSecurityDescriptor) |
Initialise une nouvelle instance de la IpcChannel classe avec les propriétés et récepteurs de configuration spécifiés. |
IpcChannel()
Initialise une nouvelle instance de la IpcChannel classe, activant uniquement un canal client et non un canal serveur.
public:
IpcChannel();
public IpcChannel();
Public Sub New ()
Exemples
L’exemple de code suivant montre comment utiliser ce constructeur. Cet exemple de code fait partie d’un exemple plus grand fourni pour la IpcChannel classe.
// Create the channel.
IpcChannel^ channel = gcnew IpcChannel;
// Create the channel.
IpcChannel channel = new IpcChannel();
S’applique à
IpcChannel(String)
Initialise une nouvelle instance de la IpcChannel classe avec un canal de serveur qui écoute sur le port IPC spécifié.
public:
IpcChannel(System::String ^ portName);
public IpcChannel(string portName);
new System.Runtime.Remoting.Channels.Ipc.IpcChannel : string -> System.Runtime.Remoting.Channels.Ipc.IpcChannel
Public Sub New (portName As String)
Paramètres
- portName
- String
Nom du port IPC.
Exemples
L’exemple de code suivant montre comment utiliser ce constructeur. Cet exemple de code fait partie d’un exemple plus grand fourni pour la IpcChannel classe.
// Create the server channel.
IpcChannel^ serverChannel = gcnew IpcChannel( L"localhost:9090" );
// Create the server channel.
IpcChannel serverChannel =
new IpcChannel("localhost:9090");
S’applique à
IpcChannel(IDictionary, IClientChannelSinkProvider, IServerChannelSinkProvider)
Initialise une nouvelle instance de la IpcChannel classe avec les propriétés et récepteurs de configuration spécifiés.
public:
IpcChannel(System::Collections::IDictionary ^ properties, System::Runtime::Remoting::Channels::IClientChannelSinkProvider ^ clientSinkProvider, System::Runtime::Remoting::Channels::IServerChannelSinkProvider ^ serverSinkProvider);
public IpcChannel(System.Collections.IDictionary properties, System.Runtime.Remoting.Channels.IClientChannelSinkProvider clientSinkProvider, System.Runtime.Remoting.Channels.IServerChannelSinkProvider serverSinkProvider);
new System.Runtime.Remoting.Channels.Ipc.IpcChannel : System.Collections.IDictionary * System.Runtime.Remoting.Channels.IClientChannelSinkProvider * System.Runtime.Remoting.Channels.IServerChannelSinkProvider -> System.Runtime.Remoting.Channels.Ipc.IpcChannel
Public Sub New (properties As IDictionary, clientSinkProvider As IClientChannelSinkProvider, serverSinkProvider As IServerChannelSinkProvider)
Paramètres
- properties
- IDictionary
Collection IDictionary spécifiant les valeurs des propriétés de configuration à utiliser par les canaux client et serveur.
- clientSinkProvider
- IClientChannelSinkProvider
Implémentation IClientChannelSinkProvider à utiliser par le canal client.
- serverSinkProvider
- IServerChannelSinkProvider
Implémentation IServerChannelSinkProvider à utiliser par le canal de serveur.
Exemples
L’exemple de code suivant montre comment utiliser ce constructeur. Cet exemple de code fait partie d’un exemple plus grand fourni pour la IpcChannel classe.
// Create the server channel.
System::Collections::IDictionary^ properties = gcnew System::Collections::Hashtable;
properties->default[ L"name" ] = L"ipc";
properties->default[ L"priority" ] = L"20";
properties->default[ L"portName" ] = L"localhost:9090";
IpcChannel^ serverChannel = gcnew IpcChannel( properties,nullptr,nullptr );
// Create the server channel.
System.Collections.IDictionary properties =
new System.Collections.Hashtable();
properties["name"] = "ipc";
properties["priority"] = "20";
properties["portName"] = "localhost:9090";
IpcChannel serverChannel = new IpcChannel(properties, null, null);
Remarques
Les récepteurs de canal fournissent un point de plug-in qui permet d’accéder aux messages sous-jacents qui transitent par le canal, ainsi que le flux utilisé par le mécanisme de transport pour envoyer des messages à un objet distant. Les récepteurs de canal sont également responsables du transport des messages entre le client et le serveur. Les récepteurs de canal sont liés dans une chaîne, et tous les messages de canal transitent par cette chaîne de récepteurs avant que le message soit finalement sérialisé et transporté. Si vous n’avez pas besoin de fonctionnalités de récepteur, définissez les paramètres et serverSinkProvider les clientSinkProvider paramètres nullsur .
Avertissement
Lors de la définition de la exclusiveAddressUse propriété false dans l’argument properties , plusieurs IpcServerChannel objets peuvent être inscrits pour le même canal nommé. Dans ce cas, les demandes peuvent accéder à l’un des canaux inscrits. Ce paramètre est considéré comme sécurisé uniquement si les AFC sont également utilisées.
S’applique à
IpcChannel(IDictionary, IClientChannelSinkProvider, IServerChannelSinkProvider, CommonSecurityDescriptor)
Initialise une nouvelle instance de la IpcChannel classe avec les propriétés et récepteurs de configuration spécifiés.
public:
IpcChannel(System::Collections::IDictionary ^ properties, System::Runtime::Remoting::Channels::IClientChannelSinkProvider ^ clientSinkProvider, System::Runtime::Remoting::Channels::IServerChannelSinkProvider ^ serverSinkProvider, System::Security::AccessControl::CommonSecurityDescriptor ^ securityDescriptor);
public IpcChannel(System.Collections.IDictionary properties, System.Runtime.Remoting.Channels.IClientChannelSinkProvider clientSinkProvider, System.Runtime.Remoting.Channels.IServerChannelSinkProvider serverSinkProvider, System.Security.AccessControl.CommonSecurityDescriptor securityDescriptor);
new System.Runtime.Remoting.Channels.Ipc.IpcChannel : System.Collections.IDictionary * System.Runtime.Remoting.Channels.IClientChannelSinkProvider * System.Runtime.Remoting.Channels.IServerChannelSinkProvider * System.Security.AccessControl.CommonSecurityDescriptor -> System.Runtime.Remoting.Channels.Ipc.IpcChannel
Public Sub New (properties As IDictionary, clientSinkProvider As IClientChannelSinkProvider, serverSinkProvider As IServerChannelSinkProvider, securityDescriptor As CommonSecurityDescriptor)
Paramètres
- properties
- IDictionary
Collection IDictionary spécifiant les valeurs des propriétés de configuration à utiliser par les canaux client et serveur.
- clientSinkProvider
- IClientChannelSinkProvider
Implémentation IClientChannelSinkProvider à utiliser par le canal client.
- serverSinkProvider
- IServerChannelSinkProvider
Implémentation IServerChannelSinkProvider à utiliser par le canal de serveur.
- securityDescriptor
- CommonSecurityDescriptor
Descripteur de sécurité.