refactor channel message encode for sioconnector