4diac Client and Python Server [message #1830489] |
Mon, 27 July 2020 15:01  |
Eclipse User |
|
|
|
Hello everyone,
We're trying to have a communication between 4diac and a Python code using Client/Server.
We use 4diac Client to connect to a Python socket to exchange information. We can successfully connect 4diac client to Python server. Python server is receiving the data from 4diac client and we can see it. But when the server replies back, 4diac client can not show it in RD output. We can see the data coming thru wire-shark but looks like 4diac client is not able to parse it and show it.
Here is the Python code:
socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.bind(("", 8080))
socket.listen(5)
while True:
client, address = socket.accept()
print(client.recv(1024))
client.send(bytes('data'))
client.close()
|
|
|
|
Powered by
FUDForum. Page generated in 0.03923 seconds