C# socket端: namespace WebSocketTest { public class Program { public static void Main(string[] args) { try { FleckLog.Level = LogLevel.Debug; var allSockets = new List<IWebSocketConnection>(); var server = new WebSocketServer("wss://0.0.0.0"); server.ListenerSocket.NoDelay = true; var currPath = System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase; server.Certificate = new X509Certificate2(currPath + ("MyCert.pfx"), "************"); server.Start(socket => { socket.OnOpen = () => Console.WriteLine("Open!"); //业务内容已隐藏 socket.OnClose = () => Console.WriteLine("Close!");//业务内容已隐藏 socket.OnMessage = message => socket.Send(message);//业务内容已隐藏 }); var input = Console.ReadLine(); while (input != "exit") { foreach (var socket in allSockets.ToList()) { socket.Send(input); } input = Console.ReadLine(); } } catch(Exception e) { Console.WriteLine(e); } } } } 小程序端: wx.connectSocket({ url: “**********”, header: { 'content-type': 'application/json' }, }); wx.onSocketError(function(res) { console.log('WebSocket连接打开失败,请检查!'+res.errMsg); //业务逻辑已隐藏 }); 报错输出log为:WebSocket连接打开失败,请检查!未能完成操作。(“OSStatus”错误-9801。) socket报错: [图片]
小程序IOS连接socket报错 osstatus -9801- 当前 Bug 的表现(可附上截图) osstatus -9801 - 预期表现 - 复现路径 - 提供一个最简复现 Demo
2018-10-17请问解决了吗?
ios手机 webSocket错误是 OSStatus 错误 -9801我的框架是 workman配置方式是: [图片] 现在安卓可以正常连接,iso出问题。具体是什么问题照成的呢
2018-09-21请问楼主解决了吗?
小程序IOS连接socket错误 osstatus -9801安卓正常,这是怎么回事呢,后台证书也配置好了
2018-09-18