C++ (Qt) QTcpSocket *socket = qobject_cast<QTcpSocket*>(sender()); if (!socket) return; int desc = hash.key(socket); hash.remove(desc);
C++ (Qt)while(!asleep()) sheep++;