add message checking of root protos

check message of server protos on encode
check message of client protos on decode