Added functionality to take care of UDP connection and made it so that the program closes when an error occurs with socket creation and binging.