sendPacket method

Future<void> sendPacket(
  1. ByteBuffer data
)

Sends an IP packet through the tunnel created for the VPN session. This will succeed only when the VPN session is owned by the extension. |data|: The IP packet to be sent to the platform. |callback|: Called when the packet is sent or if there is an error.

Implementation

Future<void> sendPacket(ByteBuffer data) async {
  await promiseToFuture<void>($js.chrome.vpnProvider.sendPacket(data.toJS));
}