i am trying to play around with python 3.5 using udp comunication but i cant seem to ever get the socket library to work it always give this error
Traceback (most recent call last):
File "C:\Users\Nicholas Hendricks\Desktop\udpServer.py", line 8, in <module>
bytes(HOST)
TypeError: string argument without an encoding
and here is my Code:
import socket
import time
HOST = 'localhost'
PORT = 5454
data = "sup bruh"
bytes(HOST)
bytes(PORT)
s = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
while 1:
s.sendto(data,(HOST,PORT))
print ("sent:" + data)