SendData Method
      
 

Description

Sends byte array message to remote peer.

Return Type

None  

Syntax

object.SendData Data, Reliable

The SendData Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type wodVPN.
Data Required. A Variant value. Byte array containing data that should be sent.
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

SendData will send byte array data to remote peer, where will IncomingData event be fired. You should use it to send arbitrary data to remote side.

You will not get notification when message is delivered. You can not know when exactly you can send new message, SendData isn't made for such "time sensitive" operations or for transferring large amount of data. Even SendData, in theory, can send any amount of data, your complete VPN 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.