Assuming that the signalling server is setup and running as shown in the previous section, we can then go on a create a real-time texting application allowing users to connect to the server and sending messages to each other. If the signalling server is not running, just make sure to start it. In the folder where we have been creating the HTML and JavaScript Files, create a new HTML named texting.php i.e., C:/xampp/htdocs/webrtc/texting.php. Inside this file create add the following code.
We can then continue to add some code to the script as shown below. Make sure to put this code in between the tags. View the complete code below to see how this fits in with the rest of the document.