Diaoul/arduino-ESP8266 — pull request #10 by jonathanchristison (2014-12-30 19:08:04+00:00)
Title: Templated send function

I don't know if theres a specific reason why the send functions are limited to the few overloads provided?
Currently the function deceleration is suggestive to use plaintext representation of primitive types i.e uint8_t would be represented by 3 or 4 characters { '2', '5', '5', '\0' }(at least it was to me, perhaps i missed something) or otherwise convert objects to character arrays.

This of course makes perfect sense when communicating in plain text between the ESP8266 and something like netcat, however M2M/binary data packets would be much easier to handle at both ends progmatically, It also reduces superfluous data. Im sure i've missed considerations of endianness but this was a quick hack as proof of concept, its unoptimised (it will currently call CIPSEND for each underlying type in an array) and its lacking a typed data reader, this again could be provided as a template overload). I'll try and add one in the next few days and a example if you think it will be useful?