inital code for server socket