Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 00d5974

Browse files
committed
fix bind arg
1 parent 37f142d commit 00d5974

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

Demo/sockets/broadcast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from SOCKET import *
88

99
s = socket(AF_INET, SOCK_DGRAM)
10-
s.bind('', 0)
10+
s.bind(('', 0))
1111
s.setsockopt(SOL_SOCKET, SO_BROADCAST, 1)
1212

1313
while 1:

Demo/sockets/mcast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def openmcastsock(group, port):
7373
s.setsockopt(SOL_SOCKET, SO_REUSEPORT, 1)
7474
#
7575
# Bind it to the port
76-
s.bind('', port)
76+
s.bind(('', port))
7777
#
7878
# Look up multicast group address in name server
7979
# (doesn't hurt if it is already in ddd.ddd.ddd.ddd format)

Demo/sockets/radio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from socket import *
77

88
s = socket(AF_INET, SOCK_DGRAM)
9-
s.bind('', MYPORT)
9+
s.bind(('', MYPORT))
1010

1111
while 1:
1212
data, wherefrom = s.recvfrom(1500, 0)

0 commit comments

Comments
 (0)