I am trying to receive a C callback in my Swift Code. The method looks like:
int transport_send(const uint8_t *data, uint32_t size, void *_custom);
Which is converted to Swift like:
func transportSend(_ data: UnsafePointer<UInt8>?,_ size: UInt32, _custom: UnsafeMutableRawPointer?)
I need to use the data being sent in this method and forward it as Data
type. How can I accomplish it?