Exemplo n.º 1
0
 def __init__(self,srv_ip,user_no, parent=None):
     threading.Thread.__init__(self)
     super(T,self).__init__(parent)
     self.runFlag = 1
     self.sock = net.connServer(srv_ip)
     self.sock.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR,1)
     cmd_data = struct.pack(net.DGRAM_FORMAT,"CMD_SOCKET",str(user_no),"","")
     self.sock.send(cmd_data)
     self.fno = ""
     self.msg = ""
     print "thread running"
Exemplo n.º 2
0
 def __init__(self, srv_ip, user_no, parent=None):
     threading.Thread.__init__(self)
     super(T, self).__init__(parent)
     self.runFlag = 1
     self.sock = net.connServer(srv_ip)
     self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
     cmd_data = struct.pack(net.DGRAM_FORMAT, "CMD_SOCKET", str(user_no),
                            "", "")
     self.sock.send(cmd_data)
     self.fno = ""
     self.msg = ""
     print "thread running"
Exemplo n.º 3
0
 def __init__(self, srv_ip, user_no, nickname, parent=None):
     QtGui.QWidget.__init__(self, parent)
     self.ui = Ui_MainWindow(self)
     self.ui.label_nickname.setText("%s[%s]" % (nickname, user_no))
     self.srv_ip = srv_ip
     self.user_no = user_no
     self.nick = nickname
     self.sock = net.connServer(self.srv_ip)
     self.setupTrayIcon()
     self.friends = {}
     self.onlist = {}
     self.offlist = {}
     self.chatroom = {}
     self.root_online = {}
     self.root_offline = {}
     self.setupFriendList()
     self.setupSignals()
     self.runDlg = {}
     self._t = None
     self.cmdTread()
     # self.queryOfflineMsg()
     self._t2 = T2()
     self._t2.signal_queryOfflineMsg.connect(self.queryOfflineMsg)
     self._t2.start()
Exemplo n.º 4
0
 def __init__(self, srv_ip, user_no, nickname, parent=None):
     QtGui.QWidget.__init__(self, parent)
     self.ui = Ui_MainWindow(self)
     self.ui.label_nickname.setText("%s[%s]" % (nickname, user_no))
     self.srv_ip = srv_ip
     self.user_no = user_no
     self.nick = nickname
     self.sock = net.connServer(self.srv_ip)
     self.setupTrayIcon()
     self.friends = {}
     self.onlist = {}
     self.offlist = {}
     self.chatroom = {}
     self.root_online = {}
     self.root_offline = {}
     self.setupFriendList()
     self.setupSignals()
     self.runDlg = {}
     self._t = None
     self.cmdTread()
     # self.queryOfflineMsg()
     self._t2 = T2()
     self._t2.signal_queryOfflineMsg.connect(self.queryOfflineMsg)
     self._t2.start()