microsoft / go-winio

Win32 IO-related utilities for Go
MIT License
946 stars 180 forks source link

bluetooth socket question #247

Open MatejMagat305 opened 2 years ago

MatejMagat305 commented 2 years ago

Can I ask, the oficial library do not contain bluetooth socket api, do you provide it? Or is it on plan? The problem is: I crreate socket and I do not know bind becouse bluetooth address do not exist.........

package main

import "golang.org/x/sys/windows"

func main() {
    sock, err := windows.Socket(windows.AF_BTH, windows.SOCK_STREAM, windows.BTHPROTO_RFCOMM)
    if err != nil {
        panic(err)
    }
    err = windows.Bind(sock,?)
    if err != nil {
        panic(err)
    }
    return
}