wireprotocol
common function use in utils.go