I'm having trouble sending a simple HTTP request using an ActionScript 3 Socket () object. My onConnect listener is below:
function sConnect(e:Event):void {
trace('connected');
s.writeUTFBytes('GET /outernet/client/rss/reddit-feeds HTTP/1.1\r\n');
s.writeUTFBytes('Host: 208.43.71.50:8080\r\n');
s.writeUTFBytes('Connection: Keep-alive\r\n');
s.flush();
}
Using the packet sniffer, I see that the request is indeed sent to the server, but the packet sniffer does not identify the protocol as HTTP, as it does with other HTTP services. When I run this, the server eventually disconnects me. I tried connecting to other simple Apache servers and just getting the wrong request error.
What am I missing here?
source
share