-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't connect. Connected Event never fires. #6
Comments
I have not tried to use this from Flash Pro. I'll see if I can put together a demo and see if it works. |
Tried upgrading to latest websocket and got it working but still no success running from IDE. However, it works in debug mode. If I publish the swf works and .exe both connect successfully. |
Found the problem...in FlashSocket.as constructor. The urlLoader is getting request from cache! So it never initiates handshake...hence it works once in a while. Changing link 57 to this fixes problem! r.url = "http://" + domain + "/socket.io/1/?time=" + new Date().getTime(); |
Nice find! Did you fork the project? if you want to submit a pull request I can merge it. If not no worries, I can just update the code. |
No..I didn't fork...go ahead an update the code! Thanks for the help! On Sat, Dec 3, 2011 at 1:51 AM, Simeon Bateman <
|
Fix applied to the source. Did you have to import Date? |
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 am using Flash CS5.5. I have noticed that if I run in debug mode it connects. Seems something is happening to fast and doesn't handshake properly.
-- 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']});
socket.on('connection', function(client){
});
The text was updated successfully, but these errors were encountered: