I am trying to have a script continuously wait for data from a socket connection, and when data is received, run a function to process that data. If the processing function