Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在 Linux 下尝试使用抽象 Socket 作为通讯底层 #150

Open
lindexi opened this issue Apr 19, 2024 · 1 comment
Open

在 Linux 下尝试使用抽象 Socket 作为通讯底层 #150

lindexi opened this issue Apr 19, 2024 · 1 comment

Comments

@lindexi
Copy link
Member

lindexi commented Apr 19, 2024

  var unixDomainSocketEndPoint = new UnixDomainSocketEndPoint("\0" + "lindexi");
  var socket = new Socket(AddressFamily.Unix, SocketType.Dgram, ProtocolType.IP);
  socket.Bind(unixDomainSocketEndPoint);

  ...

  await socket.ReceiveAsync(buffer);

  ...

  await socket.SendToAsync(data, unixDomainSocketEndPoint);
@xinyuehtx
Copy link

xinyuehtx commented Apr 19, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants