move protocol message logic to RFBCommon.