Setup socket.