writePackets(_:withProtocols:)
Writes IP packets to the TUN interface.
Declaration
func writePackets(_ packets: [Data], withProtocols protocols: [NSNumber]) -> BoolParameters
- packets:
An array of NSData objects containing the IP packets to the written.
- protocols:
An array of NSNumber objects containing the protocol numbers (e.g. AF_INET or AF_INET6) of the IP packets in
packetsin host byte order.
Discussion
The number of NSData objects in packets must be exactly equal to the number of NSNumber objects in protocols.