work on winXp

This commit is contained in:
2009-09-07 14:45:31 +04:00
parent 4e723909e7
commit d3064428c3
38 changed files with 36825 additions and 303 deletions

View File

@@ -3,12 +3,12 @@
UdpSender::UdpSender(QString IP, quint16 Port)
{
sock = new QUdpSocket();
sock = new QUdpSocket();
qDebug() << sock->state();
//cout << sock->socketDescriptor() << endl;
//qDebug() << sock->socketDescriptor();
addr = QHostAddress(IP);
port = Port;
addr = QHostAddress(IP);
port = Port;
connect(sock, SIGNAL(readyRead()),this, SLOT(slotRead()));
}
@@ -16,7 +16,7 @@ UdpSender::UdpSender(QString IP, quint16 Port)
UdpSender::~UdpSender()
{
sock->close();
delete sock;
delete sock;
}
@@ -36,10 +36,10 @@ void UdpSender::slotRead()
void UdpSender::connectSend(QString s)
{
sz = s.length();
sz = s.length();
sock->connectToHost(addr,port);
qDebug() << sock->error();
//qDebug() << sock->error();
qDebug() << sock->state();
qDebug() << sock->socketDescriptor();
if (sock->write(s.toUtf8())>0) qDebug() << "writen!";
//qDebug() << sock->socketDescriptor();
qDebug() << sock->write(s.toUtf8()) << "writen!";
}