Sending JSON object to a tcp listener port in use Python
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
0
I have a listener on a tcp localhost: HOST = '127.0.0.1' # The server's hostname or IP address PORT = 8192 # The port used by the server def client_socket(): while 1: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((TCP_IP,TCP_PORT)) s.listen(1) while 1: print 'Listening for client...' conn, addr = s.accept() print 'Connection address:', addr data = conn.recv(BUFFER_SIZE) if data == ";" : conn.close() print "Received all the