I am building a simple UDP client, however, I am getting an error message "socket is not callable". I have checked the code and it can find the problem
I tried importing the module by using "from socket import *" but it didn't work.
import socket
serverName = 'hostname'
serverPort = 1200
clientSocket = socket(socket.AF_INET, socket.SOCK_DGRAM)
message = 'Testing the system'
clientSocket.sendto(message, (serverName, serverPort))
modifiedMessage, serverAddress = clientSocket.recvfrom(2048)
print(modifiedMessage)
clientSocket.close()