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 8273675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:32:46+00:00 2026-06-08T07:32:46+00:00

I have a netty web socket server running to which various native javascript clients

  • 0

I have a netty web socket server running to which various native javascript clients connect. Now what I want to do is to get requests for data from the clients and pass back data according to what each client requested. There is a class A that actually needs to send continuous data asynchronously(ie: not a simple request reply model)to the client according to the request.

The question is – at class A , I have all the data that I need to send but how to figure out which data has to be sent to which client(has to be according to the client requests) , ie: how do I map the client requests , data to be sent from class A and the channel over which the data needs to be sent from class A. (I store all the channels in a shared ChannelGroup).

  • 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-08T07:32:47+00:00Added an answer on June 8, 2026 at 7:32 am

    You might want to try this.

    1. Instance a DefaultChannelGroup: DefaultChannelGroup myChannels = new DefaultChannelGroup("myChannels")

    2. When a web socket connect is established, add it to the channel group: myChannels.add()

    3. Add the channel id and your request id to a hashmap

    4. When you have data to write, I assume that you have the request id. Use it to look up your channel id in the hashmap

    5. Then get the channel from the channel group: myCahnnels.find(channelId)

    6. Lastly, write the data to the channel.

    Hope this helps.

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

Sidebar

Related Questions

I have a Netty TCP server, and I want to reject/refuse incoming connection attempts
I have a written a very simple UDP Server using Netty - it quite
I have an mp3 encoding server running on Ubuntu (natty). This has been working
I have experimenting with netty-4-alpha, websockets (great work!) + SSL on native Android communicating
I have about 5 different heterogenous linux dedicated server which can run Java applications.
I have two ASMX web services consumed from javascript. The first service performs a
I have just created an Ubuntu virtual machine for web development and I want
I have a TCP based Netty application with multiple clients that need to communicate
I built a simple TCP server using Netty and I want to benchmark it
I have a network server that was implemented using Jboss Netty. It servers the

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.