Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add socket network proxy #83

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,11 @@
*.suo
/Debug
/GeneratedFiles
build
build
/.vs/**
*.ilk
*.exp
*.vcxproj.filters
*.vcxproj
*.sln
*.qmake.stash
13 changes: 13 additions & 0 deletions src/qamqpclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,19 @@ bool QAmqpClient::isConnected() const
return d->connected;
}

void QAmqpClient::setProxy(const QNetworkProxy& networkProxy)
{
Q_D(QAmqpClient);
d->socket->setProxy(networkProxy);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation gone wild

}

QNetworkProxy QAmqpClient::proxy() const
{
Q_D(const QAmqpClient);
return d->socket->proxy();
}


quint16 QAmqpClient::port() const
{
Q_D(const QAmqpClient);
Expand Down
4 changes: 4 additions & 0 deletions src/qamqpclient.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <QHostAddress>
#include <QSslConfiguration>
#include <QSslError>
#include <QNetworkProxy>

#include "qamqpglobal.h"

Expand Down Expand Up @@ -70,6 +71,9 @@ class QAMQP_EXPORT QAmqpClient : public QObject
void setAutoReconnect(bool value, int timeout = 0);

bool isConnected() const;

void setProxy(const QNetworkProxy& networkProxy);
QNetworkProxy proxy() const;

qint16 channelMax() const;
void setChannelMax(qint16 channelMax);
Expand Down