Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

PeerNameRegistration Constructor (PeerName, Int32, Cloud)

Initializes a new instance of the PeerNameRegistration class with the specified peer name, port number, and Cloud.

Namespace:  System.Net.PeerToPeer
Assembly:  System.Net (in System.Net.dll)
new : 
        name:PeerName * 
        port:int * 
        cloud:Cloud -> PeerNameRegistration


Type: System.Net.PeerToPeer.PeerName

The PeerName object to register.

Type: System.Int32

Integer value that specifies the port number to register.

Type: System.Net.PeerToPeer.Cloud

Cloud in which to register the peer name.


The name parameter cannot be a null reference (Nothing in Visual Basic).


The specified port number is less than zero. Port numbers must be greater than or equal to zero and less than 65,535 (0xFFFF).

  • The PeerName specified has already been registered from this host.

  • The remote peer does not own the Authority for the supplied PeerName object.

Calling this constructor creates an instance that will be used to register all source addresses (both IPv6 and IPv4), the provided port, and the specified Cloud. If the object is constructed successfully, the properties are populated with the specified PeerName, Port and Cloud.

If the cloud parameter is a null reference (Nothing in Visual Basic), the name is registered using the Available shortcut, which initializes default values for the Name, Scope, and ScopeId.

After instantiation, the Start method must be called to register the PeerName.

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.