다음을 통해 공유


Inside the Standard Bindings: NetPeerTcp

Index for bindings in this series:

The last standard binding in the series is the NetPeerTcp binding for the PeerChannel transport. The peer transport is a multiparty network transport that sends messages across a mesh of peers. The NetPeerTcp binding requires installing the Peer-to-Peer networking service in Windows. Without this service installed, you cannot create an instance of the binding because it attempts to contact the peer name resolver.

Although the NetPeerTcp binding supports the same security settings, None, Transport, Message, and TransportWithMessageCredential, as the NetTcp binding, I'm going to break the usual pattern by not going over the modes individually. As far as I can tell, changing the security mode doesn't actually rely on changing the channel stack of the peer transport for configuration.

  1. System.ServiceModel.Channels.PnrpPeerResolverBindingElement

     ReferralPolicy: Service
    
  2. System.ServiceModel.Channels.BinaryMessageEncodingBindingElement

     MaxReadPoolSize: 64
    MaxSessionSize: 2048
    MaxWritePoolSize: 16
    ReaderQuotas: 
      MaxArrayLength: 16384
      MaxBytesPerRead: 4096
      MaxDepth: 32
      MaxNameTableCharCount: 16384
      MaxStringContentLength: 8192
    
  3. System.ServiceModel.Channels.PeerTransportBindingElement

     ListenIPAddress: 
    ManualAddressing: False
    MaxBufferPoolSize: 524288
    MaxReceivedMessageSize: 65536
    Port: 0
    Scheme: net.p2p
    

The two parts of this binding are the transport element and the peer resolver element. The peer resolver is the portion that translates an ID for the peer mesh to a collection of endpoint addresses in the mesh. The remaining configuration settings on the binding are two related to the peer resolver and the standard ones common to all bindings.

 CloseTimeout: 00:01:00
EnvelopeVersion: Soap12 (https://www.w3.org/2003/05/soap-envelope)
IsPnrpAvailable: True
Namespace: https://tempuri.org/
OpenTimeout: 00:01:00
ReceiveTimeout: 00:10:00
Resolver: System.ServiceModel.PeerResolvers.PeerResolverSettings
SendTimeout: 00:01:00

Next time: How Block Ciphers Work

Comments

  • Anonymous
    July 18, 2006
    It's been a while since the last article in the series on standard bindings, but there are only two left...
  • Anonymous
    July 29, 2006
    I thought I'd share the binding inspector program I wrote a few months ago to explore the different settings...