added checkPortSync method

checkPortSync: method to check if two ports are connected