activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Black" <>
Subject RE: websocket protocol access from remote computer
Date Fri, 10 May 2013 12:11:01 GMT
This is probably not the forum you want as this doesn't sound like it has
anything to do with ActiveMQ.

Check your firewall settings.
And check if you bound the socket to localhost or the IP address of your
machine.  You want to bind the socket to your IP address.

-----Original Message-----
From: anubhav [] 
Sent: Friday, May 10, 2013 3:51 AM
Subject: websocket protocol access from remote computer

I have designed a chat application based on websocket protocol.

i have installed a xampp server in computer A .I start the server in
computer A and then I am trying to access client.php page (url is
ipadresssofA/project/client.php) from computer B using the ip address of
computer A. But it is displaying socket error.

And when i try same url on computer A (url is
ipadresssofA/project/client.php). client get connects.BOTH COMPUTERS ARE
CONNECTED WITH SAME WIFI. Here is my client code.please tell me what is


<body onload="initialize()">
 <div id="chatlog"></div>
 <input id="msg" type="textbox" onkeypress="onkey(event)"/>
 <button onclick="send()">Send</button>
 <button onclick="quit()">Stop</button>
 <div id="userslog"></div>

Also in my server code something is written in comments which i want to show
you :

// start the server
$Server = new PHPWebSocket();
$Server->bind('message', 'wsOnMessage');
$Server->bind('open', 'wsOnOpen');
$Server->bind('close', 'wsOnClose');
// for other computers to connect, you will probably need to change this to
your LAN IP or external IP,
// alternatively use: gethostbyaddr(gethostbyname($_SERVER['SERVER_NAME']))
$Server->wsStartServer('localhost', 12345);

Please telll where i am wrong

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message