对于服务器:
QTcpServer qtp;
qtp.listen(QHostAddress::Any, 1440);
qtp.readFromClient(); //What is the name of the method to read the byte from a client ???
qtp.close();
对于客户端
QTcpClient client;
client.connect("127.0.0.1", 1440);
client.sendData(myString); // What is the name of the method to do this ???
client.close();
我没有QTcpServer既可找到一个方法名称检索数据和QTcpClient发送数据。什么是方法名称来做到这一点?
我的回答对你有帮助吗? –