Replies: 2 comments
-
Thanks, I will look into the bug you mentioned. WatsonTcp is going to, in general, be slower than rolling your own file transfer solution since serializstion and deserialization in each framed message. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I don't see the issue with the code above. If the content length is greater than the length at which WatsonTcp encapsulates the original stream, it does that. If it's less than that size, it reads the data out into a new MemoryStream. What's the issue you're encountering? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
bug:
class :WatsonTcpServer, line:1167
if (msg.ContentLength >= _Settings.MaxProxiedStreamSize)
{
ws = new WatsonStream(msg.ContentLength, msg.DataStream);
sr = new StreamReceivedEventArgs(client, msg.Metadata, msg.ContentLength, ws);
_Events.HandleStreamReceived(this, sr);
}
else
{
MemoryStream ms = await WatsonCommon.DataStreamToMemoryStream(msg.ContentLength, msg.DataStream, _Settings.StreamBufferSize, token).ConfigureAwait(false);
ws = new WatsonStream(msg.ContentLength, ms);
sr = new StreamReceivedEventArgs(client, msg.Metadata, msg.ContentLength, ws);
await Task.Run(() => _Events.HandleStreamReceived(this, sr), token);
}
i think this is should be " if (msg.ContentLength <= _Settings.MaxProxiedStreamSize)",not >=
and I am trying to use watsonTcp for large file transmission, but the performance is not satisfactory,I'm trying to figure out why
Beta Was this translation helpful? Give feedback.
All reactions