]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fixed comments
authorGuido van Rossum <guido@python.org>
Sun, 25 Oct 1992 19:20:47 +0000 (19:20 +0000)
committerGuido van Rossum <guido@python.org>
Sun, 25 Oct 1992 19:20:47 +0000 (19:20 +0000)
Demo/sockets/mcast.py

index a6bee7cd8e734bfb00b397234864bb040d73d9ee..c2bcaef43d9d7943bc5c0785a3a0d58e0260bca2 100755 (executable)
@@ -34,13 +34,13 @@ if sender:
                s.sendto(data, (mygroup, MYPORT))
                time.sleep(1)
 else:
-       # Bind the socket to my port
-       s.bind('', MYPORT)
-
        # Allow multiple copies of this program on one machine
        s.setsockopt(SOL_SOCKET, SO_REUSEPORT, 1) # (Not strictly needed)
 
-       # Ugly: construct binary group address from MYGROUP converted to bytes
+       # Bind the socket to my port
+       s.bind('', MYPORT)
+
+       # Construct binary group address from MYGROUP converted to bytes
        bytes = eval(regsub.gsub('\.', ',', MYGROUP))
        grpaddr = 0
        for byte in bytes: grpaddr = (grpaddr << 8) | byte