在 Qt 中发送整数
谁能告诉我如何打开 TCP 连接并同时发送数据? 我打开连接如下: 套接字-> conectohost(主机、端口) 我想随打开连接的命令一起发送 6 个整数。 非常感谢
anyone can tell me how to open a TCP connection and send data at the same time?
I open the connection as follows:
socket-> conectohost (host, port)
I would like to send along with the order to open connection 6 integers.
thank you very much
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
据我所知,需要等待连接建立后才能通过QTcpSocket发送数据。这样的组合在您的用例中有效吗?
As far as I know, you need to wait for the connection to be established before you can send data via QTcpSocket. Would a combination like this work in your usecase?