1. server: 
  2. def udpServer():   
  3.     address = ('', 9527)   
  4.     srvsock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)   
  5.     srvsock.bind(address)   
  6.     #data,addr = srvsock.recvfrom(2048)   
  7.   
  8. if __name__ == "__main__":   
  9.     udpServer() 
  10.  
  11. client: 
  12.  
  13. def udpClient():  
  14.     address = ('localhost', 9527)  
  15.     clisock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)  
  16.     #clisock.sendto(data, address)  
  17.       
  18. if __name__ == "__main__":  
  19.     udpClient()