although I love php and java, I wrote my socket servers in C ++ running under a lamp on ecazon ec2 cloud server. it is very, very simple to code and debug and safe, and you can almost simply copy / paste the examples.
ultimately, I will probably develop a Java solution because of portability and scalability, but the initial effort to work with a C ++ solution is much less than implementing a Java solution ...
The first thing you need to find out (find out) is whether your server allows you to open user ports. amazon ec2 does at the moment (feb13), can be used for free for 12 months.
So this is for you if you are in a hurry:
This set of examples contains everything you need as soon as possible.
source share