06-29-2017 04:01 AM - edited 06-29-2017 04:02 AM
Python 3.6
import socket def Main(): host = '' port = 49157 mySocket = socket.socket() mySocket.bind((host,port)) mySocket.listen(1) conn, addr = mySocket.accept() print ("Connection from: " + str(addr)) while True: data = conn.recv(300) if not data: break print ("Data: " + str(data)) conn.close() if __name__ == '__main__': Main()
07-27-2017 10:59 AM
The solution was to set the input "resolve remote address" of the TCP Wait on Listener to false. Default it is true and it asks after the name of the ip out of the dns, but when there is no name, after 4-5s it gets out an LabVIEW gets the connection id and can read it.
With false on resolve remote addres TCP Listen doesnt want to read the name of the ip and i get a fast connection.