我需要使用QtNetwork关闭TCP套接字的写入端(发送FIN)。
对于BSD套接字,我称之为shutdown(...,SHUT_WR)。
我如何使用QtNetwork应用程序接口来实现这一点?
发布于 2013-10-10 20:27:20
从文档中
void QIODevice::setOpenMode(QIODevice::ReadOnly)应该会有所帮助:
void QIODevice::setOpenMode(OpenMode openMode) [protected]
Sets the OpenMode of the device to openMode. Call this function to set the open mode if the flags change after the device has been opened.https://stackoverflow.com/questions/19295225
复制相似问题