Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4602774
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:02:28+00:00 2026-05-22T00:02:28+00:00

What WebSockets add to raw TCP connection? Why should I use WebSockets? I’d like

  • 0

What WebSockets add to raw TCP connection?
Why should I use WebSockets?

I’d like to hear cons and pros like:

  • Good: WebSockets add some useful things like autoreconnection, session ids, etc.
  • Bad: WebSockets add a lot of overhead

I’ll have only Flash clients, no need to support Javascript clients.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T00:02:29+00:00Added an answer on May 22, 2026 at 12:02 am

    You can’t do raw sockets from a web application in a browser. Even “raw” socket connections from Flash are not really raw because you have to answer a policy file request to get CORS security (part of the reason for the WebSockets handshake).

    After the initial WebSocket handshake, WebSocket messages have two bytes of framing overhead per frame (Hixie-* has ‘\x00…\xff’ and HyBi-07 has two byte header), so the overhead is pretty negligible compared to regular sockets.

    The WebSocket handshake is an HTTP compatible Upgrade request so it is easy to integrate WebSockets support into existing web servers and to use existing Web ports (80/443) which means that WebSocket connection can also more easily integrate into existing firewall rules.

    The HTTP compatible handshake also means that existing HTTP authentication mechanisms can work transparently with WebSockets. Also, WebSockets can be proxied by existing web proxies with little or no modification.

    In the next revision of the WebSockets protocol rev (HyBi-07), their is protection against misbehaving web intermediaries using client to server XOR masking of the payload data.

    Things like auto-reconnection, session ids, etc aren’t defined in WebSockets although several Javascript frameworks built on WebSockets have this such as Socket.IO. If you are doing WebSockets from Flash applications then you would need to do your own session management or convert an existing session management library to use WebSockets rather than Flash sockets (such be pretty easy conversion).

    Update:

    Couple of links that might be useful to you or others who land here:

    • AS3WebSocket: WebSockets client library for Flash applications.
    • web-socket-js: WebSockets fallback/polyfill implemented in Flash for Javascript applications (to add WebSockets support to browsers with Flash but without native WebSockets).
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use something like EventMachine websockets to push status updates to the
WebSockets? I just recently ran across websockets and have heard some good things about
I'd like to use Websockets with a Spring MVC-powered web app. I've read o
I have a NodeJS TCP socket server running and I'd like to add support
I have been using Sinatra for sometime now and I would like to add
It looks like Websockets in HTML 5 will become a new standard for server
I know its possible to use WebSockets within C# using a console application running
Following a previous question regarding ActiveMQ and WebSockets, I would like to know if
I need to use websockets to send a view so it can be loaded
I want to start using websockets to make a connection to a PHP socket

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.