Use stream ID and opcode constant.
Refactored in to separate send/read message functions.