return (*this);
}
bool tcpClient::check_byte_written_and_wait_written(){
- if(want_disconnect) return false;
+ if(this->want_disconnect) return false;
if(!this->waitForBytesWritten(this->timeout_time)){
this->setErrorString(tr("The data couldn't be written."));
emit this->error(QAbstractSocket::UnknownSocketError);
}
bool tcpClient::check_connection_and_wait_connected(){
- if(want_disconnect) return false;
+ if(this->want_disconnect) return false;
if(this->state()!=QAbstractSocket::ConnectingState||this->state()!=QAbstractSocket::ConnectedState){
this->setErrorString(tr("This socket haven't connected to somewhere yet."));
emit this->error(QAbstractSocket::SocketAccessError);
return true;
}
bool tcpClient::check_and_wait_byte_available(){
+ if(this->want_disconnect) return false;
if(!this->waitForReadyRead(this->timeout_time)){
this->setErrorString(tr("The data couldn't be read."));
emit this->error(QAbstractSocket::UnknownSocketError);