Added basic socket code