sock: Fix a ACK problem with ordered connections.
sock: code clean-up
sock: check whether the local lenght, offset and registered memory length are valid before starting a RMA operation.