add generic socket implementation
update common header