Kaydet (Commit) 0aead9f1 authored tarafından Guido van Rossum's avatar Guido van Rossum

Allow broadcast using setsockopt()

üst 4fab6a5b
......@@ -4,10 +4,11 @@ MYPORT = 50000
import sys, time
from socket import *
from SOCKET import *
s = socket(AF_INET, SOCK_DGRAM)
s.bind('', 0)
s.allowbroadcast(1)
s.setsockopt(SOL_SOCKET, SO_BROADCAST, 1)
while 1:
data = `time.time()` + '\n'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment