Peer Peer Peer Peer Class

Definition

This class represents a remote peer.

public ref class Peer abstract : IDisposable, IEquatable<System::Net::PeerToPeer::Collaboration::Peer ^>, System::Runtime::Serialization::ISerializable
[System.Serializable]
public abstract class Peer : IDisposable, IEquatable<System.Net.PeerToPeer.Collaboration.Peer>, System.Runtime.Serialization.ISerializable
type Peer = class
    interface IDisposable
    interface IEquatable<Peer>
    interface ISerializable
Public MustInherit Class Peer
Implements IDisposable, IEquatable(Of Peer), ISerializable
Inheritance
PeerPeerPeerPeer
Derived
Attributes
Implements

Remarks

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.

Constructors

Peer(SerializationInfo, StreamingContext) Peer(SerializationInfo, StreamingContext) Peer(SerializationInfo, StreamingContext) Peer(SerializationInfo, StreamingContext)

Initializes a new instance of the Peer type.

Properties

IsOnline IsOnline IsOnline IsOnline

Gets a value specifying if the Peer is currently 'online'.

PeerEndPoints PeerEndPoints PeerEndPoints PeerEndPoints

Gets the PeerEndPointCollection associated with the Peer.

SynchronizingObject SynchronizingObject SynchronizingObject SynchronizingObject

When 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.

Methods

Dispose() Dispose() Dispose() Dispose()

Releases all resources used by the Peer object.

Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

Releases the unmanaged resources used by the Peer object and optionally releases the managed resources.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
Equals(Peer) Equals(Peer) Equals(Peer) Equals(Peer)

Performs a case-sensitive comparison of the current Peer and the specified peer.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext)

Populates a SerializationInfo object with the data needed to serialize the target Peer.

GetObjects() GetObjects() GetObjects() GetObjects()

Gets the collection of data objects from a local cache.

GetObjects(Guid) GetObjects(Guid) GetObjects(Guid) GetObjects(Guid)

Gets the Peer object associated with the supplied Guid from the PeerObjectCollection.

GetPresenceInfo(PeerEndPoint) GetPresenceInfo(PeerEndPoint) GetPresenceInfo(PeerEndPoint) GetPresenceInfo(PeerEndPoint)

Gets the available presence information for a PeerEndPoint.

GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
Invite() Invite() Invite() Invite()

Sends an invitation to a Peer to start a specific PeerApplication.

Invite(PeerApplication, String, Byte[]) Invite(PeerApplication, String, Byte[]) Invite(PeerApplication, String, Byte[]) Invite(PeerApplication, String, Byte[])

Sends an invitation to a Peer to start a specific PeerApplication.

InviteAsync(Object) InviteAsync(Object) InviteAsync(Object) InviteAsync(Object)

Begins an asynchronous invitation operation which sends an invitation to a Peer to start a specific PeerApplication.

InviteAsync(PeerApplication, String, Byte[], Object) InviteAsync(PeerApplication, String, Byte[], Object) InviteAsync(PeerApplication, String, Byte[], Object) InviteAsync(PeerApplication, String, Byte[], Object)

Begins an asynchronous invitation operation which sends an invitation to a Peer to start a specific PeerApplication.

InviteAsyncCancel(Object) InviteAsyncCancel(Object) InviteAsyncCancel(Object) InviteAsyncCancel(Object)

Cancels the invitation that was sent with the InviteAsync(PeerApplication, String, Byte[], Object) method.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
OnInviteCompleted(InviteCompletedEventArgs) OnInviteCompleted(InviteCompletedEventArgs) OnInviteCompleted(InviteCompletedEventArgs) OnInviteCompleted(InviteCompletedEventArgs)

Raises the InviteCompleted event.

ToString() ToString() ToString() ToString()

Returns a String representing the PeerName associated with the Peer.

Events

InviteCompleted InviteCompleted InviteCompleted InviteCompleted

Raised when the invitation process for a remote peer has completed.

Explicit Interface Implementations

ISerializable.GetObjectData(SerializationInfo, StreamingContext) ISerializable.GetObjectData(SerializationInfo, StreamingContext) ISerializable.GetObjectData(SerializationInfo, StreamingContext) ISerializable.GetObjectData(SerializationInfo, StreamingContext)

Populates a SerializationInfo class instance with the data required to serialize the specified PeerObject instance. A derived type must call the base type GetObjectData(SerializationInfo, StreamingContext) method.

Applies to

See also