示例#1
0
class TCP(QtCore.QThread):
    def __init__(self, ip, port, queue, coms):
        super(TCP, self).__init__()
        self.con = TCPClient(ip, port)
        self.q = queue
        self.coms = coms

    def run(self):
        while True:
            data = self.con.recvmostrecent()
            self.q.put(data)
            self.coms.up.emit()
示例#2
0
from TCPIPWrapper import TCPClient

s = TCPClient("d-173-250-205-216.dhcp4.washington.edu", 2223)

while True:
    print s.recvmostrecent()
示例#3
0
 def __init__(self, ip, port, queue, coms):
     super(TCP, self).__init__()
     self.con = TCPClient(ip, port)
     self.q = queue
     self.coms = coms