我正在尝试在我的 Raspberry Pi 3 上运行我的第一个 IoT。
但是使用此代码....
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(客户端和服务器)”。
知道为什么我会收到此错误吗?
谢谢