Serverside socket setup

set up socket calls on the serverside, need to set up simmilar calls
for clientside