After VPN tunnel is created, I am trying to send a packet from packetFlow.readPackets() to another code via interface. This code is written in Golang which runs with the Swift App as a framework. I am able to see NSLog telling me that the packet is sent, but none of the logs written in Golang gets printed. How can I confirm whether the packets has reached the GO code?
Eg.
NE side:
self.packetFlow.readPackets { (packets: [Data], protocols: [NSNumber]) in
for packet in packets {
NSLog("Sending packet”). // prints in Device Console VpnSendbufferpacket1(packet) // Sending packet to GO NSLog("Sending Completed") // prints in Device Console } }
Go side:
VpnSendbufferpacket1(buf []byte){ print(“GO - Sendbufferpacket() -> Start”). // NO print bufferinGO := buf print(“GO - packet received", bufferinGO). // NO print }
Tried file write also but can't get the logs printed. Is there any alternative for this. Or an approach where we can pass packet info properly.