mgravell / Pipelines.Sockets.Unofficial

.NET managed sockets wrapper using the new "Pipelines" API
Other
400 stars 51 forks source link

pauseWriterThreshold and streaming data #40

Open vshapenko opened 4 years ago

vshapenko commented 4 years ago

Hello! I have discovered a strange behavior on client side when receiving large chunks of data (i.e. file parts) - data i am receiving is limited by pauseWriterThreshold. Scenario: i have a simple ptotocol over tcp, there each message has length(first 4 bytes) and body. I am stacking data inpipe reader until whole message received, after that i am processing the message. In case of large message i never receive whole message data in pipe. Increasing pauseWriterTreshold solves my problem , but this looks strange. Important: server sends packets with PSH flag is on. Question is - is this by design?