最近在使用qt coding一个项目时,使用到了qtcpsocket模块来编写客户端与服务器。在windows平台下还能正常工作,但是在ubuntu平台下,客户端提示已连接时,服务器却没有响应。经过排查,发现是在重写qtcpsocket的incomingConnection函数时出现问题,incomingConnection(int handle),应改为incomingConnection(qintptr handle)。以下是qintptr的官方解释:
Integral type for representing pointers in a signed integer (useful for hashing, etc.).
Typedef for either qint32 or qint64. This type is guaranteed to be the same size as a pointer on all platforms supported by Qt. On a system with 32-bit pointers, qintptr is a typedef for qint32; on a system with 64-bit pointers, qintptr is a typedef for qint64.
Note that qintptr is signed. Use quintptr for unsigned values.
timeout Timeout时间已到.在操作完成之前超时时间已过或服务器未响应
Timeout时间已到.在操作完成之前超时时间已过或服务器未响应 问题 在使用asp.net开发的应用程序查询数据的时候,遇到页面请求时间过长且返回"Timeout时间已到.在操作完成之间超 ...
(摘)timeout Timeout时间已到.在操作