Qtcpsocket one question
-
Hi,i have example:
main.cpp:
@
tcp_socket *s_cache=new tcp_socket(); //Inherited form qtcpsocket
QTimer *timer=new QTimer();
...
connect(timer, SIGNAL(timeout()),s_cache, SLOT(send_error()));
timer->start(2000);
@tcp_socket.cpp:
@
void tcp_socket::send_error()
{
this->write("probehla chyba spojeni");
this->disconnectFromHost();
delete(sender());
this->deleteLater();
}
@
Why the client does not receive text after 2s?
When timeout is setting on 0 sec. its work.
Srrry for my english :) -
uff, when i Inherited form QAbstractSocket, this work.
thx"Webhosting":http://www.savana.cz/