【问题标题】:IsWebSocketRequests not working in monoIsWebSocketRequest 在单声道中不起作用
【发布时间】:2017-07-11 05:06:40
【问题描述】:

我在 Windows 系统上的 .NET 中同时连接了 HTTP 和 webSockect,它工作正常,然后我将同一个项目移动到 mono 以使用 Mono 在 linux 系统上进行测试,但它给了我一个错误的案例,即 webSocket 连接 IsWebSocketRequest 正在变为错误

 if (httpListenerContext.Request.IsWebSocketRequest==true)
 {
   //some logic
 }

【问题讨论】:

    标签: c# http websocket mono httplistenerrequest


    【解决方案1】:
     httpListener.Prefixes.Add("http://127.0.0.1:8080/");
     httpListener.Start();
    

    我试过这种方式对我有用

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-11
      • 1970-01-01
      • 2016-11-09
      • 1970-01-01
      • 2021-10-22
      • 1970-01-01
      相关资源
      最近更新 更多