开发者

AS3: Socket's connection time: 1 second, too slow, isn't it?

I'd like to know what the average time is to connect a socket in Flash. My application uses a socket that requests information to a server (in localhost). 1 connection/close for every request.

Hence, I measured the time between a socket.connect() call and an Event.CONNECTION reception and it was around 1100 ms. I think is too slow.

Besides, I cannot connect, close开发者_运维百科 and connect again. I have to create a new socket for each connection, a bit strange, isn't it?

The server accepts multiple connections and it's under C#.


Check to makes sure it's not a server problem. I have used Sockets a few times and yes, 1 second is slow. It should be much faster unless there's a handshaking issue between Flex and your server.

You can definitely connect, close and connect again, as long as the socket is actually disconnected (the 'close' function is async, listen for disconnected event) since just like the original handshake to connect, the socket needs to properly close with the server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜