Add peerAddress() method to QHttpSocket.
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#ifndef QHTTPENGINE_QHTTPSOCKET_H
|
||||
#define QHTTPENGINE_QHTTPSOCKET_H
|
||||
|
||||
#include <QHostAddress>
|
||||
#include <QMultiMap>
|
||||
#include <QIODevice>
|
||||
|
||||
@@ -202,6 +203,11 @@ public:
|
||||
*/
|
||||
virtual void close();
|
||||
|
||||
/**
|
||||
* @brief Retrive the address of the remote peer
|
||||
*/
|
||||
QHostAddress peerAddress() const;
|
||||
|
||||
/**
|
||||
* @brief Determine if the request headers have been parsed yet
|
||||
*/
|
||||
|
||||
@@ -222,6 +222,11 @@ void QHttpSocket::close()
|
||||
d->socket->close();
|
||||
}
|
||||
|
||||
QHostAddress QHttpSocket::peerAddress() const
|
||||
{
|
||||
return d->socket->peerAddress();
|
||||
}
|
||||
|
||||
bool QHttpSocket::isHeadersParsed() const
|
||||
{
|
||||
return d->readState > QHttpSocketPrivate::ReadHeaders;
|
||||
|
||||
Reference in New Issue
Block a user