SendText Method
      
 

Description

Sends text message to remote peer.

Return Type

None  

Syntax

object.SendText Text, Reliable

The SendText Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type wodVPN.
Text Required. A String value. Message to be sent to remote peer.
Reliable Required. A Boolean value. When set to True then packet will 100% be delivered to remote side. When set to False, packet may drop if connection is too busy.

Remarks

SendText will send string message to remote peer, where will IncomingText event be fired. You should use it to send warning or informational messages to remote side, or to send certain commands for remote peer which you can then catch in IncomingText event and perform certain operations.

You will not get notification when message is delivered. You can not know when exactly you can send new message, SendText isn't made for such "time sensitive" operations or for transferring large amount of data. Even SendText, in theory, can send any amount of data, your complete VPN connection will be frozen until message is delivered, so all forwarded ports will have to wait. If you plan to deliver large amount of data, we suggest you forward port and use socket related mechanisms for send/receive notifications.

If you set Reliable to False, then you have no guarantees that message will be delivered at all. There are uses for this - if you're streaming data and you're ok with certain amounts of packets "dropped", similar to UDP transfer, you can use this type of transfer.