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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:28:48+00:00 2026-06-02T05:28:48+00:00

To support a protocol (Icecast Source Protocol) based on HTTP, I need to be

  • 0

To support a protocol (Icecast Source Protocol) based on HTTP, I need to be able to use a socket from Node.js’s http.Server once the HTTP request is finished. A sample request looks like this:

Client->Server: GET / HTTP/1.0
Client->Server: Some-Headers:header_value
Client->Server: 
Server->Client: HTTP/1.0 200 OK
Server->Client: 
Client->Server: <insert stream of binary data here>

This is to support the source of an internet radio stream, the source of the stream data being the client in this case.

Is there any way I can use Node.js’s built in http.Server? I have tried this:

this.server = http.createServer(function (req, res) {
    console.log('connection!');
    res.writeHead(200, {test: 'woot!'});
    res.write('test');
    res.write('test2');
    req.connection.on('data', function (data) {
        console.log(data);
    });
}).listen(1337, '127.0.0.1');

If I telnet into port 1337 and make a request, I am able to see the first couple characters of what I type on the server console window, but then the server closes the connection. Ideally, I’d keep that socket open indefinitely, and take the HTTP part out of the loop once the initial request is made.

Is this possible with the stock http.Server class?

  • 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-02T05:28:51+00:00Added an answer on June 2, 2026 at 5:28 am

    My solution to this problem was to reinvent the wheel and write my own HTTP-ish server. Not perfect, but it works. Hopefully the innards of some of these stock Node.js classes will be exposed some day.

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

Sidebar

Related Questions

I get the following error: Client does not support authentication protocol requested by server;
I've been recommended to use System.DirectoryServices.Protocols to be able to support connecting to LDAP
I'm looking for a way to check if a server is support xmpp protocol,
I want to implement support of the XMLRPC protocol for my server that is
I need to add TLS support to a simple Java-based SMTP client. The client
All objects used as keys in NS(Mutable)Dictionaries must support the NSCopying protocol, and those
Just seeking confirmation here : apache Thrift protocol does not seem to support running
What is necessary to tell a server that a Webclient supports the SPDY protocol
To support multiple platforms in C/C++, one would use the preprocessor to enable conditional
http://support.microsoft.com/kb/953102 We spent about 50 hours during Christmas holiday to identify this problem, causing

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.