對於服務器:
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發送數據。什麼是方法名稱來做到這一點?
我的回答對你有幫助嗎? –