Define the "protocol" - basically a "grammar" which defines the "language" which will be understood by the participants.
The simplest approach would be to define tokens and separators and a corresponding parser.
For example you might define a message consisting of a single char, and multiple messages will be separated by one or more spaces. Then you can send this over the wire:
A B C D E