Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (19 sloc) 0.43 kb
# Client Program
from socket import *
host = "localhost"
port = 21567
buf = 1024
addr = (host,port)
#Create socket
UDPSock = socket(AF_INET, SOCK_DGRAM)
def_msg = "===Whatever message goes here==="
print "\n", def_msg
while (1):
data = raw_input('>>')
if not data:
break
else:
if(UDPSock.sendto(data,addr)):
print "Sending message '",data,"'....."
#close socket
UDPSock.close()
Jump to Line
Something went wrong with that request. Please try again.