Skip to content

Disable Nagle algorithm on a websocket #81175

Answered by stephentoub
sebas77 asked this question in Q&A
Discussion options

You must be logged in to vote

Nagle is disabled by default for HttpClient / WebSockets on .NET Core. I can't speak to the implementation Unity currently uses, but there's also nothing we can do here about the implementation Unity currently uses. Unity's roadmap on getting to use the core libraries from here is described at https://blog.unity.com/technology/unity-and-net-whats-next.

With regards to APIs in .NET Core, if you actually want to enable it, how you do that depends on where you're getting your WebSocket from. WebSocket.CreateFromStream let's you create a WebSocket that wraps an already opened Stream, so wherever you're getting that Stream from is where you'd need to configure Nagle; from WebSocket's perspecti…

Replies: 3 comments 19 replies

Comment options

You must be logged in to vote
5 replies
@sebas77
Comment options

@HaloFour
Comment options

@sebas77
Comment options

@HaloFour
Comment options

@sebas77
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
14 replies
@stephentoub
Comment options

@sebas77
Comment options

@stephentoub
Comment options

@sebas77
Comment options

@sillykelvin
Comment options

Answer selected by MihaZupan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants