wrote basic socket