x/sys: Darwin RFCOMM socket connection

I have a working example for the socket connection which is based on linux/unix system. But when I wanted to build it for darwin amd64 I found out that certain parts of my implementation does not exists for darwin amd64 (also for arm64).

This is the main implementation:

import "golang.org/x/sys/unix"
// ...
fd, _ := unix.Socket(unix.AF_BLUETOOTH, unix.SOCK_STREAM, unix.BTPROTO_RFCOMM)
socketAddr := &unix.SockaddrRFCOMM{Addr: str2ba(addr), Channel: 6}
unix.Connect(fd, socketAddr)

The missing parts are the unix.AF_BLUETOOTH, unix.BTPROTO_RFCOMM and the unix.SockaddrRFCOMM. I cloned the github.com/golang/sys repository to find out whether there is something similar, but I didn’t find anything which looks like an RFCOMM on darwin.

Question / Feature request

Is there anything what I can use to have the same functionality under darwin amd64/arm64? Also if there is any guide/documentation which details it would be awesome. Also is there a way for quick implementation or hack to make it happen? Is there something what I can help to have it in the x/sys? (Assume I’m not a low-level expert)

You probably want to ask here: Issues · golang/go · GitHub

I asked it in the Go’s discord, they forwarded me to the issue page.
I asked it in the Go’s issue page, they forwarded me the here.

Sorry about that. I read it quickly and thought this was a proposal.

Actually, those features are missing, so it can be. But I can’t be sure.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.