initial socket stuff