import socket import math s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) host ="" port =30002 s.bind((host,port)) s.listen(1) # Number of connections s.setblocking(False) while True: try: client, address = s.accept() print("Connected to", address) data = client.recv( 1024 ).decode( 'utf-8' ) splitdata=data.split(",") print("Received :", repr(data)) print(splitdata) except socket.error: pass s.close()