Azure / azure-relay-dotnet

☁️ .NET Standard client library for Azure Relay Hybrid Connections

Home Page:https://docs.microsoft.com/en-us/azure/service-bus-relay/relay-what-is-it

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HybridConnectionListener.RequestHandler response Stream should support NoDelay

dlstucki opened this issue · comments

Actual Behavior

HybridConnectionListener.RequestHandler Response.OutputStream currently waits a period of time (2 seconds at the moment) to see if all the writes finish and the total size is <= 64KB.

Expected Behavior

If the code wants to force a rendezvous and flush written bytes there needs to be a way to opt for this. Suggestion is to allow user to set a new field, OutputStream.NoDelay.

        listener.RequestHandler = (context) =>
        {
>>>         context.Response.OutputStream.NoDelay = true;         <<<
            context.Response.StatusCode = HttpStatusCode.OK;
            
            // Stream the body here...
        }; 

Versions

  • OS platform and version: Windows 10
  • .NET Version: .NET 4.6
  • NuGet package version or commit ID: 2.0.0-preview1-20180523