Altered socket creation function to accept options, made option for broadcast