DotMSN |

# P2PTransferSession Methods

The methods of the P2PTransferSession class are listed below. For a complete list of P2PTransferSession class members, see the P2PTransferSession Members topic.

#### Public Instance Methods

AbortTransfer | Aborts the datatransfer, if available. This will send a P2P abort message and stop the sending thread. It will not close a direct connection. If AutoCloseStream is set to true, the datastream will be closed.
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.
GetType (inherited from Object) | Gets the Type of the current instance.
HandleMessage | Handles P2PMessages. Other messages are ignored. All incoming messages are supposed to belong to this session.
RegisterHandler | Registers handlers for incoming p2p messages.
SendMessage | Sends a message for this session to the message processor. If a direct connection is established the p2p message is directly send to the message processor. If there is no direct connection available, it will wrap the incoming p2p message in a MSGMessage with the correct parameters. It also sets the identifiers and acknowledge session, provided they're not already set.
StartDataTransfer | Starts a seperate thread to send the data in the stream to the remote client. It will first wait for a direct connection if tryDirectConnection is set to true.
ToString (inherited from Object) | Returns a String that represents the current Object.
UnregisterHandler | Unregisters handlers.

#### Protected Instance Methods

AbortTransferThread | Aborts a running data transfer thread.
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.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
OnTransferAborted | Fires the TransferAborted event.
OnTransferFinished | Fires the TransferFinished event.
OnTransferStarted | Fires the TransferStarted event.
SendAbortMessage | Sends the remote client a p2p message with the 0x80 flag to abort.
SendDisconnectMessage | Sends the remote client a p2p message with the 0x40 flag to indicate we are going to close the connection.
TransferDataEntry | Entry point for the thread. This thread will send the data messages to the message processor. In case it is a direct connection P2PDCMessages will be send. If no direct connection is established P2PMessage objects are wrapped in a SBMessage object and send to the message processor. Which is in the latter case probably a SB processor.

#### See Also

P2PTransferSession Class | XihSolutions.DotMSN.DataTransfer Namespace