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
wrong

<html>
<head>






</head>
<body onload="initialize()">
 <center>
 <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>
 </center>
</body>
</html>

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: 
http://activemq.2283324.n4.nabble.com/websocket-protocol-access-from-remote-computer-tp4666878.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to