Search code examples
c#xamarin.formsxamarin.androidwifi-directwifip2p

Xamarin Android WiFi Direct routing


I have been working on some wifi direct communication. It currently works but I am having to rethink how routing will happen. I need to route upload streams (two different file inputs and a string input) to specific paths. The ideas I have had to sort the input streams are

  1. add a header (can't find any docs on how to accomplish that and this would be by far the easiest way to handle this situation)
  2. create a distinct socket for each input stream

I feel like the different distinct sockets could lead to multiple simultaneous connections. I am not sure if that could cause an issue but it seems like it potentially could.

There must be a cleaner way to handle this. I have not been able to track down any documentation on this and I would really like to hear if someone has a better idea.


Solution

  • Ended up setting my own system. sent everything as a byte[] in the format [Header length][Header][Body]. This made the data easy to parse into it own areas.