Get the latest updates from us for free

My journey with websocket - native websocket and node js - Day1

My little curious mind is always involved in game development, I used to develop game in my early days using basic interpreter then later using dbase/foxpro -well dont amaze, yo u can do but not at the higher level, then later on I learned  PHP and I found it suitable for me.

I did some web app development the CMS and etc....but still my passion of developing game is there, for which i started finding options to make games. In between I got the idea of websockets, so here my trouble starts.

After learning so many articles I understood I need VPS to publish my games, development is find I can do in WAMP.

From here my journey started:

I started looking for free VPS option and I got 2 ,1 from and later from which is in my other article ( Free VPS).

In my first VPS I tried some code then done some experiment but not successded , later I understood websocket is blocked from moderator then stopped working there.

In my new VPS as usual I started working on websocket and same issue still persist and it is not working at all. Till here I have learned lot many things about websocket, but I was not getting the real experience.

So far native websocket not worked for me, then I thought lets have look at node.js, it might work as it is JS server itself . Then I started exploring node.js , run some native node.js example and it worked. So I felt happy.

Now the time was to try webscoket and it failed ass usual.... but still I feel to give try then I started digging many articles and 1 had helped me - but there was another problem with code, which was actually my VPS problem, I have 2 IPS in my VPS , so localhost is pointing to other IP and I was working on other IP(with other website  :D ). So to use this I used IP instead of localhost.

So from here I started running websocket then I realize this could be the problem of my native websocket also and it was exactly same.
I tried with my IP instead localhost and it worked.

Native code :
$server = new Server("localhost", "8000", true);

This could be change like this

$server = new Server("", "8000", true);

<script src="http://localhost:8000/">

This could be change like this

<script src="">

Keep looking here for more updates .


Confused? Feel free to ask





Protection Status

Follow me on Google+ Registered & Protected




Copyright © 2012 All Rights Reserved. Any Article on This Blog can not be repost or reproduce in any form without the permission of Author.