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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:30:11+00:00 2026-05-24T18:30:11+00:00

I want to continuously stream data at a very low bitrate : a few

  • 0

I want to continuously stream data at a very low bitrate : a few bytes per second.

My WCF REST service works fine when I stream a large amount of data. But when the bitrate is low, it seems that the stream is buffered until there is enough data to pass to the transport layer.

As a result, I receive 16Ko of data every 16 sec instead of 1Ko every sec.

How can I implement low bitrate streaming in WCF REST?

My WCF service:

void StartMyWCFService()
{ 
    host = new WebServiceHost(typeof(IServ), new Uri("http://localhost:4530/");
    var bnd = new WebHttpBinding();
    bnd.TransferMode = TransferMode.Streamed;
    host.AddServiceEndpoint(typeof(IServ), bnd, "");
    host.Open();
}


[ServiceContract]
public interface IServ
{
    [OperationContract, WebGet(UriTemplate = "/")]
    Stream MyStream();
}

[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
class Serv : IServ
{
    public Stream MyStream()
    {
        var resp = WebOperationContext.Current.OutgoingResponse;
        resp.StatusCode = System.Net.HttpStatusCode.OK;
        return _new MyStream();
    }
}

class MyStream : Stream
{
    public override int Read(byte[] buffer, int offset, int count)
    {
        // returns a few bytes every second
    }
    [...]
}

Edit: I noticed a 16Ko hardcoded buffer size deep inside .net framework (v4) at:
System.ServiceModel.dll#System.ServiceModel.Channels.HttpOutput.WriteStreamedMessage()

Thanks

  • 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-24T18:30:12+00:00Added an answer on May 24, 2026 at 6:30 pm

    I’ve got a answer from MS. The stream is sent by 16ko/32ko chrunk. This behavior is “by design”.

    More info:
    http://social.msdn.microsoft.com/Forums/en/wcf/thread/0662dc2e-6468-47c5-9676-fa14a56121cb

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

Sidebar

Related Questions

I am reading data continuously from a sensor and want to plot chart using
I want to rotate an image continuously on page load. Code works fine for
I want to do swipe gesture to slide the UIView continuously and getting data
I want to continuously sample from my PC's audio line in using C# (then
I want to create some kind of AJAX script or call that continuously will
I have a process which gives me continuously output in Screen. I want to
Here is my script... all I want to do is have it continuously loop!
I want to continuously ping a server and see a message box when ever
I want my arrows to continuously move left and right with a delay of
I have a MediaPlayer playing a file, and I want to continuously write logging

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.