Here is the GS2..
PHP Code:
function onCreated() {
temp.req = requestURL("http://automation.whatismyip.com/n09230945.asp");
waitfor(req, "onReceiveData", 30);
this.ip = req.data[0];
if (isObject("HTTPListenSocket")) {
HTTPListenSocket.destroy();
}
this.listenSocket = new TSocket("HTTPListenSocket");
this.listenSocket.optionDB = this;
this.listenSocket.join("http_listensocket");
}
I managed to send data to it via HTML5 websockets but it only echo's the handshake and not the data being sent from the onReceiveData part.