- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- File List
- File Members

Defines | Functions

# qwsutils_qws.h File Reference

`#include <QtCore/QIODevice>`

Go to the source code of this file.

## Defines
#define | QWS_SOCK_BASE QUnixSocket
#define | QWS_SOCK_SERVER_BASE QUnixSocketServer
## Functions
int | qws_read_uint (QIODevice *socket)
void | qws_write_uint (QIODevice *socket, int i)

## Define Documentation

#define QWS_SOCK_BASE QUnixSocket

Search for all occurrences

Definition at line 54 of file qwsutils_qws.h.

#define QWS_SOCK_SERVER_BASE QUnixSocketServer

Search for all occurrences

Definition at line 55 of file qwsutils_qws.h.

## Function Documentation

int qws_read_uint | ( | QIODevice * | socket | ) | `[inline]`

Search for all occurrences

Definition at line 73 of file qwsutils_qws.h.

    {
        if (!socket || socket->bytesAvailable() < (int)sizeof(int))
            return -1;

        int i;
        socket->read(reinterpret_cast<char*>(&i), sizeof(i));

        return i;
    }

void qws_write_uint | ( | QIODevice * | socket,
|  | int | i
| ) |  | `[inline]`

Search for all occurrences

Definition at line 84 of file qwsutils_qws.h.

    {
        if (!socket)
            return;

        socket->write(reinterpret_cast<char*>(&i), sizeof(i));
    }