ConnectionManager SendInstantMessage Method (Peer, 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 ( _
	Peer As Peer, _
	Message As String, _
	Optional InstantMessageType As Integer = 0, _
	Optional Callback As SendInstantMessageComplete = Nothing _
) As Guid

Parameters

Peer
Type: sP2PLib Peer
Remote peer to send message to
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