异步SslStream错误 [英] Asynchronous SslStream Error
问题描述
我创建了一个异步SslStream侦听器,但没有正确接收客户端的消息
侦听器代码
代码已删除
joran我不想让代码在这里了
这是我尝试发送到服务器的消息Hello From Client / p>
这是我的服务器控制台如何显示它
Hello
从
Clie
t
有人可以告诉我为什么我没有收到消息正确?,它真的很奇怪,我不能解决它,我想要帮助
And\Or我可以使用StreamReader接收消息吗?它是非阻塞的,所以代码将保持异步?
到一个字符串,这将有所帮助。看到你声明你的读缓冲区的长度为5个字节我怀疑这与每行输出5个字符有关。
I created an Asynchronous SslStream Listener but it did not receive the message from the client properly
The Listener Code
Code Removed
joran i don't want the code to be here anymore
Here is the message i try to send to the server "Hello From Client"
and here is how my server console show it
Hello
From
Clie
t
Can someone tell me why i did not receive the message correctly ?, it is really very weird and i can't solve it please i want help
And\Or can i use StreamReader to receive a message ? is it non blocking so the code will remain asynchronous ?
You haven't posted the code where you convert the generated byte array to a string, which would help. Seeing as you're declaring your read buffer as 5 bytes in length I suspect this has something to do with the 5 characters per line output.
这篇关于异步SslStream错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!