move protocol logic to RFBCommon project.