Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Socket - keep it alive or reconnect every time you need it?

Engaged ,
Oct 26, 2009 Oct 26, 2009

Hello, there.

What would be the better approach for using the Sockets in AS3.

1st) open one connection and keep it alive until the site unloads?

2nd) open a connection, use it, and close it when done; then, open again when I need?

Considering a scenario where some users will make a constant use of the Socket, but others will almost not use it, what would be the better approach? Does an alive Socket connection use too much bandwidth? Does the action of connecting consumes more than keeping it alive? What is your opinion?

Thank you all!

CaioToOn!

TOPICS
ActionScript
2.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 26, 2009 Oct 26, 2009

Keep it alive!

When you establish new connection with  the socket you will wait to rise a connect event before operted with it. If you keep it alive you can operate with it in any time.

The weight of this massage is only few bytes

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 28, 2009 Oct 28, 2009

Thank you, Kalisto.

I would like to know how much expensive (in time and bandwidth) is to keep a Socket alive against connecting it, is there any information about it around there?

Thank you,

CaioToOn!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 28, 2009 Oct 28, 2009

I think that kind information  is inposible to be get because it depends of internet connection. From some users the time will be less from the other users.

Also keep alive msg may depend from protocol and my be only one Byte sendend on every 15 sek ( for example )

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 28, 2009 Oct 28, 2009

Thank you again, Kalisto.

I will search for an accurated information. If I found, I post.

Thank for pointing out the way!

CaioToOn!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 28, 2009 Oct 28, 2009
LATEST

yw,

If you dicsover something please let me know.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines