-
Notifications
You must be signed in to change notification settings - Fork 2
Using uwsgi protocol
Roman edited this page Apr 24, 2017
·
1 revision
About this protocol you can read more in official page
This protocol implement genserver which allows for independence from general app.
Start new uwsgi process and start connection with fcgi server
{ok, Pid} = sgi_uwsgi:start(),
We keep pid of process for avoiding copy of data using methods. After this function we keep also connection process.
This protocol much more easy then FastCGI and support sending only once.
Pid ! {overall, self(), CGIParams, has_body(Http), Body},
{sgi_uwsgi_return, Out} % common respones
{sgi_uwsgi_return_error, Err} % some error
{sgi_uwsgi_timeout, Pid} % self timeout
Stop uwsgi process with the release of resources. Connection process let go also.
sgi_uwsgi:stop(Pid),