I am writing an application in Qt5, and I have used QtScript (script engine) to evaluate JavaScript. I want to create a transmission control protocol socket in one JavaScript file, and I want to use that function in another JavaScript.
For example, I'll write one JavaScript file:
function CreateSocketfunction()
{
//...... Logic for creating socket in java script
}
and another JavaScript file:
//calling function.
CreateSocket();
Does anyone know how to accomplish this task?