I have a PHP application running on Apache 2.4 and PHP 5.6.13 which uses https protocol. The internal IP of the server is 10.0.4.160.
I installed ratchet websocket to communicate between a client and the server via a websocket.
I followed the instructions from the Ratchet documentation to set up the server. I run my server and then opened up 2 dos windows and finally was able to sent messages between the 2 windows.
php bin/chat-server.php
telnet localhost 8080
telnet localhost 8080
Now I am trying to send messages from a client to the server on port 8080. I followed the instruction to the very bottom of the instruction page "Next Steps " section. when I try to connect to the server from Google Chrome Javascript's Console I never get a message saying "Connection established!"
var conn = new WebSocket('ws://10.0.4.160:8080');
conn.onopen = function(e) {
console.log("Connection established!");
};
conn.onmessage = function(e) {
console.log(e.data);
};
What am I doing wrong to connect to the server?