simb/FlashSocket.IO — Issue #6: Can't connect.  Connected Event never fires.
Author: drazmo
Created: 2011-11-29 21:34:13+00:00
State: open

I created new project and link to as3corelib.swc, FlashSocket.IO-0.7.x-Beta_1.swc, and WebSocket.swc.
I added sample code from README file. Tried using socket.io 8 and socket.io 7

-- I keep getting this message on the server:
info - socket.io started
debug - setting request GET /socket.io/1/flashsocket/1306369664936810977
debug - set heartbeat interval for client 1306369664936810977
debug - flashsocket writing 7:::1+0
warn - client not handshaken client should reconnect
info - transport end
debug - set close timeout for client 1306369664936810977
debug - cleared close timeout for client 1306369664936810977
debug - cleared heartbeat interval for client 1306369664936810977
debug - discarding transport

-- On the Client Side this is my output
webSocketLog: policy file: xmlsocket://dev.bigstar.tv:843
webSocketLog: connected
webSocketLog: request header:
GET / HTTP/1.1

Upgrade: WebSocket

Connection: Upgrade

Host: localhost:1935

Origin: flash.swf://undefined:undefined

Cookie:

Sec-WebSocket-Key1: A1 VO 96 &68 21X 3 5 4g=

Sec-WebSocket-Key2: # 16 m jd B 8 52 920- k

webSocketLog: sent key3: lY@Ù©H?
webSocketLog: closed

-- server Code
var http = require('express'),
io = require('socket.io'),
sys = require('sys');

// socket.io
var socket = io.listen(1935, {transports:['websocket', 'flashsocket', 'xhr-polling']});

// Add a connect listener
socket.on('connection', function(client){

var interval = setInterval(function() {
client.send('This is a message from the server! ' + new Date().getTime());
},5000);
// Success! Now listen to messages to be received
client.on('message',function(event){
console.log('Received message from client!',event);
client.send('Echo: ' + event );
});
client.on('disconnect',function(){
//clearInterval(interval);
console.log('Client has disconnected');
});

});