I have implemented following code of NEDNSProxyProvider. My basic requirement is I want to process the flow but instead of using data from datagrams I want to use data received from our custom DNS server. After tons of articles documentation Im able to write following code. But it's failing continuously in writeDataGrams with "Invalid arguments data" and "The operation could not be completed because Flow not connected". I know somethings is wrong in processing the data but what is wrong Im not able to figure out. Also I want to know is this even possible to achieve this by using API call inside datagrams for loop and then send data to writedatagrams? After getting JSONResponse Im using third party library to convert query form JSONData binary before sending it to writeDataGrams. https://github.com/Bouke/DNS.
The reason of using API call inside datagrams is, our backend server needs track of all https requests and the data that server send in response of API call, it will decide whether this particular url should be processed/accessible or not.
@Eskimo , @meton - could please help this requirement.