Added basic socket functionality