Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

socket io across two different ports

<!doctype html>
<html>
    <head>
        <script src='https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.0.1/socket.io.js'></script>
        <script>
            var socketClient1 = io('ws://localhost:5566');
            var socketClient2 = io('ws://localhost:7788');
        </script>
    </head>
    <body>
        <ul id='messages'></ul>
    </body>
</html>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #socket #io #ports
ADD COMMENT
Topic
Name
5+5 =