Snap! Websites
An Open Source CMS System in C++
The server_access plugin is used when sending data to the server and needing to receive a signal that the server is done doing whatever work was asked of it. More or less, it is very much like having a client/server callback, only within a browser only the client can generate a request to the server, never the other way around. For this reason, you need to have a way to repitively send requests to the server to know whether it is done with the work load.
This plugin very much simplifies such callbacks for other plugins. For example, when you attach an image in an Image Drag & Drop area, you can request for the image to be shown. This is actually very easy since the browser can directly show that image. However, if the document the user just dropped is a PDF file, instead, it won't show up a preview automatically. It is possible to ask the server for a preview of the front page though. This works by immediately sending the file to the server, wait on the server to transform the PDF file in a PNG image. Loading that PNG image and displaying it in the client's browser. The editor takes care of sending the PDF and requesting the preview. The server takes over and does the work of generating that preview (most often on a backend computer). In the meantime, the client sends requests for that image to the server. As long as the server says "not ready", the client will keep trying. Once the server either says "failed to convert" or "there is the image", the server_access plugin stops.
This plugin is really only for developers. There are no client side options to tweak. Only objects that make use of this feature may offer ways to turn of the feature.
Snap! Websites
An Open Source CMS System in C++