C# 有dotnet core 2.0.0 Socket.Listen()支持UNIX域套接字吗?

C# 有dotnet core 2.0.0 Socket.Listen()支持UNIX域套接字吗?,c#,ubuntu,.net-core,ubuntu-16.04,unix-socket,C#,Ubuntu,.net Core,Ubuntu 16.04,Unix Socket,根据,我从corefx/src/System.Net.Sockets/tests/FunctionalTests/UnixDomainSocketTest.cs复制了实现,并在本地使用它,如下所示。(我正在Ubuntu上使用DotnetCore2.0.0) 例外情况如下所示: Operation not supported at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketErr

根据,我从corefx/src/System.Net.Sockets/tests/FunctionalTests/UnixDomainSocketTest.cs复制了实现,并在本地使用它,如下所示。(我正在Ubuntu上使用DotnetCore2.0.0)

例外情况如下所示:

Operation not supported
   at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
   at System.Net.Sockets.Socket.Listen(Int32 backlog)
   at test01.Program.Main(String[] args) in /home/nonstatic/code/temp/test01/Program.cs:line 106

是否有任何解决方案或解决方法可以让dotnet core在Linux中构建域套接字服务器?谢谢

看起来@stephentoub在你的手机上回答了这个问题

您是否尝试了SocketType.Stream而不是SocketType.Dgram

Operation not supported
   at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
   at System.Net.Sockets.Socket.Listen(Int32 backlog)
   at test01.Program.Main(String[] args) in /home/nonstatic/code/temp/test01/Program.cs:line 106