Title: How to use zeroconf replace dns-sd · Issue #275 · python-zeroconf/python-zeroconf · GitHub
Open Graph Title: How to use zeroconf replace dns-sd · Issue #275 · python-zeroconf/python-zeroconf
X Title: How to use zeroconf replace dns-sd · Issue #275 · python-zeroconf/python-zeroconf
Description: dns-sd -R "Library Color ddd" _ipp._tcp.,_universal . 631 pdl="image/urf" URF="" My code #!/usr/bin/env python3 """ Example of announcing a service (in this case, a fake HTTP server) """ import argparse import logging import socket from ...
Open Graph Description: dns-sd -R "Library Color ddd" _ipp._tcp.,_universal . 631 pdl="image/urf" URF="" My code #!/usr/bin/env python3 """ Example of announcing a service (in this case, a fake HTTP server) """ import arg...
X Description: dns-sd -R "Library Color ddd" _ipp._tcp.,_universal . 631 pdl="image/urf" URF="" My code #!/usr/bin/env python3 """ Example of announcing a service (in ...
Opengraph URL: https://github.com/python-zeroconf/python-zeroconf/issues/275
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"How to use zeroconf replace dns-sd","articleBody":"```bash\r\ndns-sd -R \"Library Color ddd\" _ipp._tcp.,_universal . 631 pdl=\"image/urf\" URF=\"\"\r\n```\r\n\r\nMy code\r\n\r\n```python\r\n#!/usr/bin/env python3\r\n\r\n\"\"\" Example of announcing a service (in this case, a fake HTTP server) \"\"\"\r\n\r\nimport argparse\r\nimport logging\r\nimport socket\r\nfrom time import sleep\r\n\r\nfrom zeroconf import IPVersion, ServiceInfo, Zeroconf\r\n\r\ndesc = {\r\n \"pdl\": \"image/urf\",\r\n \"URF\": \"\",\r\n}\r\n\r\nif __name__ == '__main__':\r\n logging.basicConfig(level=logging.DEBUG)\r\n\r\n parser = argparse.ArgumentParser()\r\n parser.add_argument('--debug', action='store_true')\r\n version_group = parser.add_mutually_exclusive_group()\r\n version_group.add_argument('--v6', action='store_true')\r\n version_group.add_argument('--v6-only', action='store_true')\r\n args = parser.parse_args()\r\n\r\n if args.debug:\r\n logging.getLogger('zeroconf').setLevel(logging.DEBUG)\r\n if args.v6:\r\n ip_version = IPVersion.All\r\n elif args.v6_only:\r\n ip_version = IPVersion.V6Only\r\n else:\r\n ip_version = IPVersion.V4Only\r\n\r\n info = ServiceInfo(\r\n \"_ipp._tcp.local.\",\r\n \"Library Color ddd._ipp._tcp.local.\",\r\n addresses=[socket.inet_aton(\"192.168.67.101\")],\r\n port=631,\r\n properties=desc,\r\n server=\"Library Color ddd._ipp._tcp.local.\",\r\n priority=40,\r\n )\r\n\r\n zeroconf = Zeroconf(ip_version=ip_version)\r\n print(\"Registration of a service, press Ctrl-C to exit...\")\r\n zeroconf.register_service(info)\r\n try:\r\n while True:\r\n sleep(0.1)\r\n except KeyboardInterrupt:\r\n pass\r\n finally:\r\n print(\"Unregistering...\")\r\n zeroconf.unregister_service(info)\r\n zeroconf.close()\r\n\r\n```\r\n\r\nIt's wrong\r\n","author":{"url":"https://github.com/NullYing","@type":"Person","name":"NullYing"},"datePublished":"2020-06-07T17:10:47Z","url":"https://github.com/python-zeroconf/python-zeroconf/issues/275"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:69ab6e23-4dae-c4b9-8300-3c6512107187 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8292:476C3:C413B:1113AB:6B008019 |
| html-safe-nonce | cc059ace28091fc96dffd7e875ee3176065c25a57800f3bdea5cf3c1feab2399 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MjkyOjQ3NkMzOkM0MTNCOjExMTNBQjo2QjAwODAxOSIsInZpc2l0b3JfaWQiOiI4OTUwMzUyMTA2MTI0MDg1NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 31c18b1cff222a1f9c068facbbd00ab5647d628f3bfeeefe75906607a199e517 |
| hovercard-subject-tag | issue:633585957 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-zeroconf/python-zeroconf/275/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c20936e3597482dbfaa375cc51089ebbee8f7b35e5f96bfd5d0b3a4580b09c8b/python-zeroconf/python-zeroconf/issues/275 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c20936e3597482dbfaa375cc51089ebbee8f7b35e5f96bfd5d0b3a4580b09c8b/python-zeroconf/python-zeroconf/issues/275 |
| og:image:alt | dns-sd -R "Library Color ddd" _ipp._tcp.,_universal . 631 pdl="image/urf" URF="" My code #!/usr/bin/env python3 """ Example of announcing a service (in this case, a fake HTTP server) """ import arg... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | NullYing |
| hostname | github.com |
| expected-hostname | github.com |
| None | 82c186f13e104004ab7bdb779f3195e59dd38bfde531aaa74b76470fc2462b83 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-zeroconf/python-zeroconf git https://github.com/python-zeroconf/python-zeroconf.git |
| octolytics-dimension-user_id | 120192235 |
| octolytics-dimension-user_login | python-zeroconf |
| octolytics-dimension-repository_id | 21548731 |
| octolytics-dimension-repository_nwo | python-zeroconf/python-zeroconf |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 21548731 |
| octolytics-dimension-repository_network_root_nwo | python-zeroconf/python-zeroconf |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d1bc2aa1939001689f5ce935982c10a6138f745c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width