xhr= new XMLHttpRequest(); //creates a new XMLHttpRequest
xhr.open("GET", "file.txt", false);
xhr.send(); // the request is sent
responsee = (xhr.responseText); // and the response is received
When the request is sent using 'xhr.send()' how can you get the source port for that particular request