#include <qwssocket_qws.h>
Definition at line 90 of file qwssocket_qws.h.
◆ QWSServerSocket()
QWSServerSocket::QWSServerSocket |
( |
const QString & |
file, |
|
|
QObject * |
parent = 0 |
|
) |
| |
Definition at line 175 of file qwssocket_qws.cpp.
void init(const QString &file)
The QTcpServer class provides a TCP-based server.
The QUnixSocketServer class provides a Unix domain socket based server.
◆ ~QWSServerSocket()
QWSServerSocket::~QWSServerSocket |
( |
| ) |
|
◆ incomingConnection()
void QWSServerSocket::incomingConnection |
( |
int |
socketDescriptor | ) |
|
|
protected |
Definition at line 259 of file qwssocket_qws.cpp.
QList< int > inboundConnections
void append(const T &t)
Inserts value at the end of the list.
◆ init()
void QWSServerSocket::init |
( |
const QString & |
file | ) |
|
|
private |
Definition at line 185 of file qwssocket_qws.cpp.
211 int s = ::socket(PF_LOCAL, SOCK_STREAM, 0);
213 perror(
"QWSServerSocket::init");
214 qWarning(
"QWSServerSocket: unable to create socket.");
222 struct sockaddr_un
a;
223 memset(&
a, 0,
sizeof(
a));
224 a.sun_family = PF_LOCAL;
225 strncpy(
a.sun_path, fn.
constData(),
sizeof(
a.sun_path) - 1);
226 int r = ::bind(s, (
struct sockaddr*)&
a, SUN_LEN(&a));
228 perror(
"QWSServerSocket::init");
235 perror(
"QWSServerSocket::init");
242 if (::listen(s, backlog) == 0) {
243 if (!setSocketDescriptor(s))
244 qWarning(
"QWSServerSocket could not set descriptor %d : %s", s,
errorString().toLatin1().constData());
246 perror(
"QWSServerSocket::init");
The QByteArray class provides an array of bytes.
long ASN1_INTEGER_get ASN1_INTEGER * a
bool listen(const QByteArray &path)
Tells the server to listen for incoming connections on path.
Q_GUI_EXPORT QString errorString(EGLint code=eglGetError())
Q_CORE_EXPORT void qWarning(const char *,...)
QByteArray toLocal8Bit() const Q_REQUIRED_RESULT
Returns the local 8-bit representation of the string as a QByteArray.
const char * constData() const
Returns a pointer to the data stored in the byte array.
ServerError
The ServerError enumeration represents the errors that can occur during server establishment.
#define qPrintable(string)
◆ newConnection
void QWSServerSocket::newConnection |
( |
| ) |
|
|
signal |
◆ nextPendingConnection()
QWSSocket * QWSServerSocket::nextPendingConnection |
( |
| ) |
|
Definition at line 266 of file qwssocket_qws.cpp.
QList< int > inboundConnections
int count(const T &t) const
Returns the number of occurrences of value in the list.
T takeFirst()
Removes the first item in the list and returns it.
The QMutexLocker class is a convenience class that simplifies locking and unlocking mutexes...
◆ inboundConnections
QList<int> QWSServerSocket::inboundConnections |
|
private |
◆ ssmx
The documentation for this class was generated from the following files: