Refactores gather-read and scatter-write

The header_data_type is now unknown to the
socket scructure.