DotMSN

P2PHandler Members

P2PHandler overview

Public Instance Properties

MessageProcessor The message processor that will send the created P2P messages to the remote contact.
MessageSessions A list of all current p2p message sessions. Multiple threads can access this resource so make sure to lock this.
NSMessageHandler The nameserver handler. This object is used to request new switchboard sessions.

Public Instance Methods

ClearMessageSessions Aborts and cleans up all running messagesessions and their transfersessions.
Equals (inherited from Object)Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object)Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetSession Gets a reference to a p2p message session with the specified remote contact. In case a session does not exist a new session will be created and returned.
GetType (inherited from Object)Gets the Type of the current instance.
HandleMessage Handles incoming sb messages. Other messages are ignored.
ToString (inherited from Object)Returns a String that represents the current Object.

Public Instance Events

SessionClosed Occurs when a P2P session is closed.
SessionCreated Occurs when a P2P session is created.

Protected Instance Constructors

P2PHandler Constructor Protected constructor.

Protected Instance Properties

SwitchboardSessions A collection of all available switchboard sessions

Protected Instance Methods

AddSessionProcessor Sets the specified messageprocessor as the default messageprocessor for the message session.
AddSwitchboardSession Add a switchboard handler to the list of switchboard sessions to send messages to.
CloseMessageSession Closes a message session.
CreateSessionFromLocal Creates a p2p session. The session is at the moment of return pure fictive; no actual messages have been sent to the remote client. The session will use the P2PHandler's messageprocessor as it's default messageprocessor.
CreateSessionFromRemote Creates a session based on a message received from the remote client.
Finalize (inherited from Object)Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
GetSessionFromLocal Gets the p2p message session for which the local identifier equals the identifier passed as a parameter. This is typically called when a message is created.
GetSessionFromRemote Gets the p2p message session for which the remote identifier equals the identifier passed as a parameter. This is typically called when an incoming message is processed.
GetSwitchboardSession Gets a switchboard session with the specified remote contact present in the session. Null is returned if no such session is found.
MemberwiseClone (inherited from Object)Creates a shallow copy of the current Object.
OnSessionClosed Fires the SessionClosed event.
OnSessionCreated Fires the SessionCreated event.
RemoveSessionProcessor Removes the messageprocessor from the specified messagesession, because it is invalid.
RemoveSwitchboardSession Removes a switchboard handler from the list of switchboard sessions to send messages to.
RequestSwitchboard Requests a new switchboard processor.
SetSessionIdentifiersAfterAck After the first acknowledgement we must set the identifier of the remote client.

See Also

P2PHandler Class | XihSolutions.DotMSN.DataTransfer Namespace