I try to communicate 2 raspberry pi's and I use UDP server. While creating udp server I used the codes below, however I took an error as it requires an integer at the line 10. Can you help me please ?
This is for Raspberry pi 3 and I try udp server.
import socket
UDP_IP = "127.0.0.1"
UDP_PORT = "5005"
MESSAGE ="1"
print "UDP target IP:", UDP_IP
print " UDP target port:", UDP_PORT
print"message:", MESSAGE
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.sendto(MESSAGE, (UDP_IP, UDP_PORT))
I expect to create the sending server.