#!/usr/bin/env python3
#-*- coding:utf-8 -*-
from socket import *
import struct
import time
HOST ='192.168.1.74'
PORT = 60000
BUFFSIZE=2048
ADDR = (HOST,PORT)
tctimeClient = socket(AF_INET,SOCK_STREAM)
tctimeClient.connect(ADDR)
a=[0x55, 0xaa]
data=struct.pack("%dB"%(len(a)),*a)
while True:
#data = input(">")
#if not data:
#break
#tctimeClient.send(data.encode())
tctimeClient.send(data)
#time.sleep(10)
data = tctimeClient.recv(BUFFSIZE).decode()
if not data:
break
print(data)
tctimeClient.close()