its just a test, wait a week...

This commit is contained in:
andrey
2010-02-03 09:10:40 +03:00
parent 835518ce1a
commit d20473731f
72 changed files with 679 additions and 37791 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;
}
@@ -31,15 +31,16 @@ void UdpSender::slotRead()
//cout << endl;
//qDebug() << sock->write(recstr.toUtf8());
qDebug() << sock->socketDescriptor();
emit dataResieved(recdata);
}
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();
qDebug() << sock->write(s.toUtf8()) << "writen!";
qDebug() << sock->socketDescriptor();
if (sock->write(s.toUtf8())>0) qDebug() << "writen!";
}