#include <qsocks5socketengine_p.h>
Definition at line 167 of file qsocks5socketengine_p.h.
◆ QSocks5PasswordAuthenticator()
QSocks5PasswordAuthenticator::QSocks5PasswordAuthenticator |
( |
const QString & |
userName, |
|
|
const QString & |
password |
|
) |
| |
◆ beginAuthenticate()
bool QSocks5PasswordAuthenticator::beginAuthenticate |
( |
QTcpSocket * |
socket, |
|
|
bool * |
completed |
|
) |
| |
|
virtual |
Reimplemented from QSocks5Authenticator.
Definition at line 479 of file qsocks5socketengine.cpp.
485 char *buf = dataBuf.
data();
488 buf[pos++] = uname.
size();
489 memcpy(&buf[pos], uname.
data(), uname.
size());
491 buf[pos++] = passwd.
size();
492 memcpy(&buf[pos], passwd.
data(), passwd.
size());
493 return socket->
write(dataBuf) == dataBuf.size();
char * data()
Returns a pointer to the data stored in the byte array.
The QByteArray class provides an array of bytes.
QByteArray toLatin1() const Q_REQUIRED_RESULT
Returns a Latin-1 representation of the string as a QByteArray.
int size() const
Returns the number of bytes in this byte array.
#define S5_PASSWORDAUTH_VERSION
qint64 write(const char *data, qint64 len)
Writes at most maxSize bytes of data from data to the device.
◆ continueAuthenticate()
bool QSocks5PasswordAuthenticator::continueAuthenticate |
( |
QTcpSocket * |
socket, |
|
|
bool * |
completed |
|
) |
| |
|
virtual |
Reimplemented from QSocks5Authenticator.
Definition at line 496 of file qsocks5socketengine.cpp.
qint64 bytesAvailable() const
Returns the number of incoming bytes that are waiting to be read.
The QByteArray class provides an array of bytes.
qint64 read(char *data, qint64 maxlen)
Reads at most maxSize bytes from the device into data, and returns the number of bytes read...
void close()
Closes the I/O device for the socket, disconnects the socket's connection with the host...
#define S5_PASSWORDAUTH_VERSION
char at(int i) const
Returns the character at index position i in the byte array.
◆ errorString()
QString QSocks5PasswordAuthenticator::errorString |
( |
| ) |
|
|
virtual |
◆ methodId()
char QSocks5PasswordAuthenticator::methodId |
( |
| ) |
|
|
virtual |
◆ password
QString QSocks5PasswordAuthenticator::password |
|
private |
◆ userName
QString QSocks5PasswordAuthenticator::userName |
|
private |
The documentation for this class was generated from the following files: