def removeSocket(self, sockItem): _id = sockItem.getId() if _id < 0: return parentId = sockItem.getParentId() sockType = sockItem.getSockType() logger.debug("sockType --> %d, _id=%d, parentId=%d" % (sockType, _id, parentId)) if sockType == socktypes.TCP_CLIENT_REMOTE: tcpServerManager.removeRemoteClient(_id, parentId) self.window.ui.sockTab.removeFormById(_id) elif sockType == socktypes.TCP_SERVER: logger.debug("remove tcp server") tcpServerManager.removeServer(_id) elif sockType == socktypes.UDP_SERVER: udpServerManager.removeServer(_id) self.window.ui.sockTab.removeFormById(_id) elif sockType == socktypes.TCP_CLIENT_LOCAL: tcpClientManager.removeClient(_id) self.window.ui.sockTab.removeFormById(_id) elif sockType == socktypes.UDP_CLIENT_LOCAL: logger.debug("remove udp client") udpClientManager.removeClient(_id) self.window.ui.sockTab.removeFormById(_id) else: pass
def removeSocket(self, sockItem): _id = sockItem.getId() if _id < 0: return parentId = sockItem.getParentId() sockType = sockItem.getSockType() logger.debug("sockType --> %d, _id=%d, parentId=%d" % (sockType, _id, parentId)) if sockType == socktypes.TCP_CLIENT_REMOTE: tcpServerManager.removeRemoteClient(_id, parentId) self.window.ui.sockTab.removeFormById(_id) elif sockType == socktypes.TCP_SERVER: logger.debug("remove tcp server") tcpServerManager.removeServer(_id) elif sockType == socktypes.UDP_SERVER: udpServerManager.removeServer(_id) self.window.ui.sockTab.removeFormById(_id) elif sockType == socktypes.TCP_CLIENT_LOCAL: tcpClientManager.removeClient(_id) self.window.ui.sockTab.removeFormById(_id) elif sockType == socktypes.UDP_CLIENT_LOCAL: logger.debug("remove udp client") udpClientManager.removeClient(_id) self.window.ui.sockTab.removeFormById(_id) else: pass
def removeRemoteTcpClientById(self, _id, parentId): tcpServerManager.removeRemoteClient(_id, parentId) self.window.ui.sockTab.removeFormById(_id)
def removeRemoteTcpClientById(self, _id, parentId): tcpServerManager.removeRemoteClient(_id, parentId) self.window.ui.sockTab.removeFormById(_id)