And I have to create a thread inside a function, that is (the thread) in an infinite loop waiting for connections and accepting messages from another process (so, the thread is going to work as a tcp server), and whenever a message comes, it has to ¿use? or call or whatever the function that's passed as a parameter, to the function the thread is created in.And I have to create a thread inside a function