some basic socket stuff