mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
fix bind arg
This commit is contained in:
parent
37f142d1d1
commit
00d59746f6
3 changed files with 3 additions and 3 deletions
|
@ -7,7 +7,7 @@ from socket import *
|
|||
from SOCKET import *
|
||||
|
||||
s = socket(AF_INET, SOCK_DGRAM)
|
||||
s.bind('', 0)
|
||||
s.bind(('', 0))
|
||||
s.setsockopt(SOL_SOCKET, SO_BROADCAST, 1)
|
||||
|
||||
while 1:
|
||||
|
|
|
@ -73,7 +73,7 @@ def openmcastsock(group, port):
|
|||
s.setsockopt(SOL_SOCKET, SO_REUSEPORT, 1)
|
||||
#
|
||||
# Bind it to the port
|
||||
s.bind('', port)
|
||||
s.bind(('', port))
|
||||
#
|
||||
# Look up multicast group address in name server
|
||||
# (doesn't hurt if it is already in ddd.ddd.ddd.ddd format)
|
||||
|
|
|
@ -6,7 +6,7 @@ import sys
|
|||
from socket import *
|
||||
|
||||
s = socket(AF_INET, SOCK_DGRAM)
|
||||
s.bind('', MYPORT)
|
||||
s.bind(('', MYPORT))
|
||||
|
||||
while 1:
|
||||
data, wherefrom = s.recvfrom(1500, 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue