Cutelyst  1.5.0
Signals | Public Member Functions | Protected Attributes | Properties | List of all members
CWSGI::WSGI Class Reference

Implements a WSGI server. More...

#include <Cutelyst/WSGI>

Inheritance diagram for CWSGI::WSGI:
Inheritance graph
[legend]

Signals

void ready ()
 

Public Member Functions

 WSGI (QObject *parent=nullptr)
 
QString application () const
 
bool autoReload () const
 
int bufferSize () const
 
QString chdir () const
 
QString chdir2 () const
 
QString chownSocket () const
 
QString fastcgiSocket () const
 
QString gid () const
 
QString httpSocket () const
 
QString ini () const
 
bool lazy () const
 
int load (Cutelyst::Application *app=nullptr)
 
bool master () const
 
qint64 postBuffering () const
 
qint64 postBufferingBufsize () const
 
QString processes () const
 
void setApplication (const QString &application)
 
void setAutoReload (bool enable)
 
void setBufferSize (qint64 size)
 
void setChdir (const QString &chdir)
 
void setChdir2 (const QString &chdir2)
 
void setChownSocket (const QString &chownSocket)
 
void setFastcgiSocket (const QString &fastcgiSocket)
 
void setGid (const QString &gid)
 
void setHttpSocket (const QString &httpSocket)
 
void setIni (const QString &ini)
 
void setLazy (bool enable)
 
void setMaster (bool enable)
 
void setPostBuffering (qint64 size)
 
void setPostBufferingBufsize (qint64 size)
 
void setProcesses (const QString &process)
 
void setSocketAccess (const QString &socketAccess)
 
void setSocketRcvbuf (int value)
 
void setSocketSndbuf (int value)
 
void setSocketTimeout (int timeout)
 
void setSoKeepalive (bool enable)
 
void setStaticMap (const QString &staticMap)
 
void setStaticMap2 (const QString &staticMap)
 
void setTcpNodelay (bool enable)
 
void setThreads (const QString &threads)
 
void setTouchReload (const QString &file)
 
void setUid (const QString &uid)
 
QString socketAccess () const
 
int socketRcvbuf () const
 
int socketSndbuf () const
 
int socketTimeout () const
 
bool soKeepalive () const
 
QString staticMap () const
 
QString staticMap2 () const
 
bool tcpNodelay () const
 
QString threads () const
 
QString touchReload () const
 
QString uid () const
 

Protected Attributes

WSGIPrivate * d_ptr
 

Properties

QString application
 
bool auto_reload
 
qint64 buffer_size
 
QString chdir
 
QString chdir2
 
QString chown_socket
 
QString fastcgi_socket
 
QString gid
 
QString http_socket
 
QString ini
 
bool lazy
 
bool master
 
qint64 post_buffering
 
qint64 post_buffering_bufsize
 
QString processes
 
bool so_keepalive
 
QString socket_access
 
int socket_rcvbuf
 
int socket_sndbuf
 
int socket_timeout
 
QString static_map
 
QString static_map2
 
bool tcp_nodelay
 
QString threads
 
QString touch_reload
 
QString uid
 

Detailed Description

Definition at line 39 of file wsgi.h.

Member Function Documentation

int CWSGI::WSGI::load ( Cutelyst::Application app = nullptr)

This function will start the WSGI server.

If an application is provided it will ignore the value of setApplication and/or the Application configuration in case Ini is set, meaning it won't dynamically load an Application but use this to create new instances (if the app constructor is marked as Q_INVOKABLE).

It will return 0 in case of sucess.

void CWSGI::WSGI::ready ( )
signal

It is emitted once the server is ready.

Property Documentation

bool CWSGI::WSGI::auto_reload
readwrite

Reload application if the application file is modified or touched

Accessors:
autoReload(), setAutoReload()

Definition at line 150 of file wsgi.h.

QString CWSGI::WSGI::chdir
readwrite

Defines directory to chdir to before application loading

Accessors:
chdir(), setChdir()

Definition at line 86 of file wsgi.h.

QString CWSGI::WSGI::chdir2
readwrite

Defines directory to chdir to after application loading

Accessors:
chdir2(), setChdir2()

Definition at line 114 of file wsgi.h.

QString CWSGI::WSGI::chown_socket
readwrite

Defines owner of UNIX sockets.

Accessors:
chownSocket(), setChownSocket()

Definition at line 223 of file wsgi.h.

QString CWSGI::WSGI::gid
readwrite

Defines group id of the process.

Accessors:
gid(), setGid()

Definition at line 215 of file wsgi.h.

QString CWSGI::WSGI::ini
readwrite

Load config from ini file

Accessors:
ini(), setIni()

Definition at line 122 of file wsgi.h.

bool CWSGI::WSGI::lazy
readwrite

Defines is the Application should be lazy loaded.

Accessors:
lazy(), setLazy()

Definition at line 231 of file wsgi.h.

QString CWSGI::WSGI::processes
readwrite

Defines the number of processes to use, if set to "auto" the ideal processes count is used

Accessors:
threads(), setThreads()

Definition at line 77 of file wsgi.h.

int CWSGI::WSGI::socket_rcvbuf
readwrite

Sets the socket receive buffer size in bytes at the OS level. This maps to the SO_RCVBUF socket option

Accessors:
socketRcvbuf(), setSocketRcvbuf()

Definition at line 198 of file wsgi.h.

int CWSGI::WSGI::socket_sndbuf
readwrite

Sets the socket send buffer size in bytes at the OS level. This maps to the SO_SNDBUF socket option

Accessors:
socketSndbuf(), setSocketSndbuf()

Definition at line 190 of file wsgi.h.

int CWSGI::WSGI::socket_timeout
readwrite

Defines set internal socket timeout

Accessors:
socketTimeout(), setSocketTimeout()

Definition at line 106 of file wsgi.h.

QString CWSGI::WSGI::static_map
readwrite

Map the mountpoint to static directory (or file)

Accessors:
staticMap(), setStaticMap()

Definition at line 130 of file wsgi.h.

QString CWSGI::WSGI::static_map2
readwrite

Map the mountpoint to static directory (or file), completely appending the requested resource to the docroot

Accessors:
staticMap2(), setStaticMap2()

Definition at line 138 of file wsgi.h.

bool CWSGI::WSGI::tcp_nodelay
readwrite

Enable TCP NODELAY on each request

Accessors:
tcpNodelay(), setTcpNodelay()

Definition at line 178 of file wsgi.h.

QString CWSGI::WSGI::threads
readwrite

Defines the number of threads to use, if set to "auto" the ideal thread count is used

Accessors:
threads(), setThreads()

Definition at line 68 of file wsgi.h.

QString CWSGI::WSGI::touch_reload
readwrite

Reload application if the specified file is modified or touched

Accessors:
touchReload(), setTouchReload()

Definition at line 158 of file wsgi.h.

QString CWSGI::WSGI::uid
readwrite

Defines user id of the process.

Accessors:
uid(), setUid()

Definition at line 207 of file wsgi.h.