I have to communicate with an iPhone. I have its IP address and port (received by Bonjour)
I need to send "0x50544833" (or similarly, this is a hex number), then the size of the data (below) And then the data itself
The data is only a string that looks like this:
& lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt ;! DOCTYPE Plist System "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> & Lt; Plist version = "1.0" & gt; & Lt; Dict & gt; & Lt; Key & gt; CLIENTNAME & lt; / Key & gt; & Lt; String & gt; XXX & lt; / String & gt; & Lt; Key & gt; ClientService & lt; / Key & gt; & Lt; String & gt; 0be397e7-21f4-4d3c-89d0-cdf179a7e14d & lt; / String & gt; & Lt; Key & gt; RegisterCode & lt; / Key & gt; & Lt; String & gt; 0000 & lt; / String & gt; & Lt; / Dict & gt; & Lt; / Plist & gt;
Necessity also requires that I have to send the data in a bit endian format (which I think is the default for Intel).
Then it will be: Hex_Number + Data size + string_with_the_above_xml.
I need to send the iPhone and read the feedback.
According to your experience, what would be the best way to send this data (read more feedback)?
Update : I did not write the iPhone software It uses TCP / IP depending on the port operating system, but I have not seen it from 57xxx to 60xxxx, The mac version of this software always uses TCP / IP. I do not have any access to its source code, but I am in contact with my developer, who has sent me the information of sending and sending the data Once the Benzzer service is resolved, "Open the socket and ..."
Yes, you can use TcpClient for this scenario. It will work perfectly in this case.
Comments
Post a Comment