messaging client implemented in C