Hi guys, i'm new to sockets and find it pretty fun. But i got a question, in my code here:
import sys, socket
import socket, sys
dest = ('<broadcast>', 51423)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
s.sendto("Hi", dest)
print "Looking for replies; press Ctrl-C to stop."
while 1:
(buf, address) = s.recvfrom(2048)
if not len(buf):
break
print "Received from %s: %s" % (address, buf)
it tells me if theres any packets/messages sent across the network, but when i use it on my wireless nothing happens, even though i may have my friends on it and using the wireless. But i see nothing do you guys have any suggestions? Thanks