first version of generic sock (move to isaplib when tested)