tsuibin
5th November 2010, 16:05
i want use tcpsocket send a uchar data,, but there is no function conversion uchar to QByteArray
how can i use qtcpsocket send const unsigned char* src data ?
conversion to
QByteArray ?
QChar ?
this->m_tcpSocket = new QTcpSocket(this);
this->tcpSocket->connectToHost("192.168.0.111",8888);
connect(this->tcpSocket,SIGNAL(connected()),this,(sendData()));
sendData function
{
const unsigned char* src = some unsigned char data
this->tcpSocket->write(?,size) ?
}
how can i use qtcpsocket send const unsigned char* src data ?
conversion to
QByteArray ?
QChar ?
this->m_tcpSocket = new QTcpSocket(this);
this->tcpSocket->connectToHost("192.168.0.111",8888);
connect(this->tcpSocket,SIGNAL(connected()),this,(sendData()));
sendData function
{
const unsigned char* src = some unsigned char data
this->tcpSocket->write(?,size) ?
}