Add basic socket functionality (stright from tutorial)