seperating socket concerns into one file