Azure / Azure/DotNetty

websocket中获取不了消息

Open
#417 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
4.3k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

代码如下
if (frame is TextWebSocketFrame)
{
// Echo the frame
ctx.WriteAsync(frame.Retain());
string strtmp = ((TextWebSocketFrame)frame).Text();
Console.WriteLine($"{DateTime.Now},收到:{strtmp}");
return;
}
当frame是text类型帖时
string strtmp = ((TextWebSocketFrame)frame).Text();这样取出来的值是空的,不知是bug还是我的用法不对,如果用法不对,要获取客户端传过来的文本内容时,应该怎么写?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.