socket also reads old_data

Another socket event introduced to read the old data from database until fresh data is received from the datalogger.