Write a protocol handler for the messages `hello ping goodbye`.