Peer Class

This class represents a remote peer.

Namespace:  System.Net.PeerToPeer.Collaboration
Assembly:  System.Net (in System.Net.dll)

[<AbstractClass>]
[<SerializableAttribute>]
type Peer =  
    class 
        interface IDisposable 
        interface IEquatable<Peer>
        interface ISerializable 
    end

The Peer type exposes the following members.

  NameDescription
Protected methodPeerInitializes a new instance of the Peer type.
Top

  NameDescription
Public propertyIsOnlineGets a value specifying if the Peer is currently 'online'.
Public propertyPeerEndPointsGets the PeerEndPointCollection associated with the Peer.
Public propertySynchronizingObjectWhen this property value is set, all events not fired as the result of an asynchronous operation will have the associated event handlers called back on the thread that created the specific SynchronizingObject.
Top

  NameDescription
Public methodDispose()Releases all resources used by the Peer object.
Protected methodDispose(Boolean)Releases the unmanaged resources used by the Peer object and optionally releases the managed resources.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodEquals(Peer)Performs a case-sensitive comparison of the current Peer and the specified peer.
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Protected methodGetObjectDataPopulates a SerializationInfo object with the data needed to serialize the target Peer.
Public methodGetObjects()Gets the collection of data objects from a local cache.
Public methodGetObjects(Guid)Gets the Peer object associated with the supplied Guid from the PeerObjectCollection.
Public methodGetPresenceInfoGets the available presence information for a PeerEndPoint.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodInvite()Sends an invitation to a Peer to start a specific PeerApplication.
Public methodInvite(PeerApplication, String, Byte[])Sends an invitation to a Peer to start a specific PeerApplication.
Public methodInviteAsync(Object)Begins an asynchronous invitation operation which sends an invitation to a Peer to start a specific PeerApplication.
Public methodInviteAsync(PeerApplication, String, Byte[], Object)Begins an asynchronous invitation operation which sends an invitation to a Peer to start a specific PeerApplication.
Public methodInviteAsyncCancelCancels the invitation that was sent with the InviteAsync method.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodOnInviteCompletedRaises the InviteCompleted event.
Public methodToStringReturns a String representing the PeerName associated with the Peer. (Overrides Object.ToString().)
Top

  NameDescription
Public eventInviteCompletedRaised when the invitation process for a remote peer has completed.
Top

  NameDescription
Explicit interface implemetationPrivate methodISerializable.GetObjectDataPopulates a SerializationInfo class instance with the data required to serialize the specified PeerObject instance. A derived type must call the base type GetObjectData method.
Top

The purpose of the abstract Peer class is to provide a common base class definition that can be shared by derived classes such as PeerNearMe and PeerContact. It cannot be directly constructed, since it is abstract. Developers should use the subclasses PeerNearMe or PeerContact instead.

Contact, peer, remote peer, PeerNearMe, LocalContact, and PeerContact are synonymous terms, based on context.

"Calling peer" and "remote peer" are commonly synonymous. Calling peer does not refer to the application calling a given method.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

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.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft