ConnectionManager SendInstantMessage Method (Guid, Guid, String, Int32, ConnectionManager )sP2P NAT Traversal and peer-to-peer networking API
sP2P NAT Traversal and peer-to-peer networking API
Sends instant message to remote peer using checkpoint server system

Namespace: sP2PLib
Assembly: sP2PLib (in sP2PLib.dll) Version: 1.6.0.0 (1.6.0.0)
Syntax

Public Function SendInstantMessage ( _
	RemotePeerCheckpointUID As Guid, _
	RemotePeerUID As Guid, _
	Message As String, _
	Optional InstantMessageType As Integer = 0, _
	Optional Callback As SendInstantMessageComplete = Nothing _
) As Guid

Parameters

RemotePeerCheckpointUID
Type: System Guid
Checkpoint UID of remote peer
RemotePeerUID
Type: System Guid
UID of remote peer
Message
Type: System String
Message text
InstantMessageType (Optional)
Type: System Int32
Field that can be used freely in application to distinguish instant messages types, like chat text, control message ...
Callback (Optional)
Type: SendInstantMessageComplete
Callback to execute upon message sending completion, note that this is completion of sending message to checkpoint not other peer

Return Value

Randomly generated GUID for message, it can be used in later processing to distinguish particular message
See Also