for tests

This commit is contained in:
eichhornchen
2021-01-07 15:23:28 +01:00
parent 1702d258bf
commit 5ada0920f0
2 changed files with 46 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
from typing import Any, Tuple, Generator
from ipaddress import IPv6Address
import re
import socket
import time
import struct
# Initialise socket for IPv6 datagrams
sock = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 2)
sock.sendto("hello world".encode('utf-8'), ("ff02::4242:4242", 1212))