[英]How to send and receive over sockets in C++ in QT?
我想做這個
對於服務器:
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 中沒有找到方法名來發送數據。 這樣做的方法名稱是什么?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.