i want to receive data from This Milesight trafficX camera which has this option in Post setting :
.
i already managed to get data from HTTP section simply ran an http server and inserted the http server IP address and port in the camera setting and i was receiving it (thanks to mdonkers), but as you may know its just plain text(no security or encryption) so i wanted to give TCP a try but i couldn’t accomplish anything yet.
I have tried some many codes like this :
import socket
target_host = "Camera IP"
target_port = 50000
#creating socket object
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
#connecting the client
client.connect((target_host, target_port))
while True:
#receiving the data
response = client.recv(4096)
print(response.decode())
but it just do nothing and the terminal keeps doing anything, idk what im doing wrong, maybe the whole way of doing it is wrong idk.