2
我想在我的树莓派3IOT:每个套接字地址(协议/网络地址/端口)只有一个使用的通常是允许
运行我的第一个物联网但是使用这个代码....
public void StartServer()
{
Task.Run(async() =>
{
listener = new StreamSocketListener();
listener.Control.KeepAlive = true;
listener.Control.NoDelay = true;
await listener.BindServiceNameAsync(port.ToString());
});
}
我得到这个错误在BindServiceNameAsync ...
Exception thrown: 'System.Runtime.InteropServices.COMException' in mscorlib.ni.dll
WinRT information: Only one usage of each socket address (protocol/network address/port)
is normally permitted.
在appmanifest我已签的 “Internet(客户端&服务器)”。
任何想法,为什么我得到这个错误?
感谢