uclient: add function for getting the amount of pending read/write data