More types. Printing from chromeos works a little bit.

This commit is contained in:
2020-12-25 23:25:39 +01:00
parent 7ecbae27c2
commit 8b5f69cb52
14 changed files with 393 additions and 124 deletions

View File

@@ -24,7 +24,7 @@ func Run(ctx context.Context) {
log.Fatalf("EntryGroupNew() failed: %v", err)
}
hostname, err := a.GetHostName()
//hostname, err := a.GetHostName()
if err != nil {
log.Fatalf("GetHostName() failed: %v", err)
}
@@ -40,7 +40,7 @@ func Run(ctx context.Context) {
txt = append(txt, []byte("Color=T"))
txt = append(txt, []byte("rp=ipp/print"))
txt = append(txt, []byte("ty=ChroBro 001"))
err = eg.AddService(avahi.InterfaceUnspec, avahi.ProtoUnspec, 0, hostname, "_ipp._tcp", "local", fqdn, 1234, txt)
err = eg.AddService(avahi.InterfaceUnspec, avahi.ProtoUnspec, 0, "ChroBro 1000", "_ipp._tcp", "local", fqdn, 1234, txt)
if err != nil {
log.Fatalf("AddService() failed: %v", err)
}