Matt-and-Gib / gleemail

glEEmail is a novel hardware/software peer-to-peer chat application for Arduino
The Unlicense
0 stars 0 forks source link

Networking: Switch Callback to Array Reference #73

Open AVividLight opened 2 years ago

AVividLight commented 2 years ago

Function pointers are expensive, and for networking all that we really want to do is write to an array. Let's just pass that array as a reference instead to improve performance and make Networking less dependent on main.

Remove void updateDisplayWithPeerChat(char*); in main and pass messageToPrint instead. This will still maintain low coupling between Networking and Display.