Setting up socket calls