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

  • Home
  • SEARCH
  • 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 8561045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:24:51+00:00 2026-06-11T16:24:51+00:00

Is it possible to create a websocket connection in java code, without the handshake

  • 0

Is it possible to create a websocket connection in java code, without the handshake request?

I know how to create one with a handhsake request using the following:

  String request = "GET " + path + " HTTP/1.1\r\n"
            + "Upgrade: WebSocket\r\n" + "Connection: Upgrade\r\n"
            + "Host: " + host + "\r\n" + "Origin: " + origin + "\r\n"
            + extraHeaders.toString() + "\r\n";

But i want o avoid the above, and once i open a socket connection, just want to send frames down the channel?.. is this possible?

  • 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-06-11T16:24:52+00:00Added an answer on June 11, 2026 at 4:24 pm

    You cannot create a WebSocket connection without the WebSocket handshake. The WebSocket handshake and framing is a critical part of the protocol. The handshake is HTTP compatible and allows WebSockets to more easily interact with existing web infrastructure. Among other things, the handshake adds security mechanisms and allows Cross Origin Resource Sharing (CORS).

    After the handshake, each WebSocket frame is still not raw data. WebSocket is a message based protocol so the frame headers contain message delineation, frame length, message type (binary, text, ping, etc), etc. Also, data from the client (browser) to the server must be masked using a running XOR mask. This is to avoid a theoretical vulnerability in HTTP intermediaries (proxies, HTTP caches, etc).

    Don’t be misled by the "Socket" in the name. WebSockets has many benefits of raw TCP sockets such as being full-duplex, bi-directional, long-lived and low latency, but it is a message based transport protocol layered on raw TCP sockets and using an HTTP friendly handshake.

    See the official IETF 6455 WebSocket spec for more details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Create instance of “Class” Using “Reflection” in JavaScript Java has Class.forName(XYZClass) to
Is possible create something like this without using ActionBar? I just need button which
Is it possible create a IPhone application by using java and LWUIT framework?
Hi it'd like to know if it's at all possible create a parametric equalizer
Possible Duplicate: Create an Array of the Last 30 Days Using PHP I am
Possible Duplicate: Create an alert on any view controller after Facebook request:didFailWithError: I have
Possible Duplicate: Create Excel file in Java How to save output in excel format
I know its possible to use WebSockets within C# using a console application running
i would like to know if this is possible: create a shared git repository
Is possible to create more than one email profile on email router in Dynamic

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.