Sockets are one thing I haven't really learnt about but know from friends in the business that they are used a lot on 'virtual worlds' like Ibiza.com etc.
At the moment I am using Flash to call a PHP file every 10 seconds, and this PHP file sends the Flash movie all of the current variables (positions/actions/speach) etc of other people in the 'virtual world'.
But... will the use of Sockets make this any better or allow real-time updates?
What are 'sockets' good for?
Moderator: General Moderators
Sockets is a term thrown around that can refer to many things. To me it implies tcp/ip sockets which is just a pipe between processes.
I have attached a link to an example of some php code that uses a socket to connect to another website to pull some content.
viewtopic.php?t=7063
I am not an expert in this but I believe you would need to have a java applet embedded in your page that uses sockets to communicate to a servlet on the server in order to get real-time updates.
I have attached a link to an example of some php code that uses a socket to connect to another website to pull some content.
viewtopic.php?t=7063
I am not an expert in this but I believe you would need to have a java applet embedded in your page that uses sockets to communicate to a servlet on the server in order to get real-time updates.
Ok thanks for that.
I think I will just stick with the way I'm doing things at the moment.. it's not real-time but there's only a few seconds lag between someone moving in the virtual-world and the movements being updated on everyone elses screen so it's almost-real-time.
I'll check out that link away
I think I will just stick with the way I'm doing things at the moment.. it's not real-time but there's only a few seconds lag between someone moving in the virtual-world and the movements being updated on everyone elses screen so it's almost-real-time.
I'll check out that link away