Direct plugin access to connecting socket

Version Number 1.263
Finished Yes
Type feature

This new feature will allow a plugin to run without any of that overhead. When the plugin outputs something via stdout, that data is immediately sent to the user's socket. No directadmin output it sent through the socket at all.

With this flexibility, comes the responsibility to send the correct headers as well.

The way to tell DA that you want to have full control over the socket, is to rename your script file with the extension ”.raw”, eg:

/usr/local/directadmin/plugins/pluginname/user/script.raw

Sample script.raw:

#!/bin/sh
echo “HTTP/1.1 200 OK”;
echo “Content-Type: text/html”;
echo ””;
echo “hello world<br>”;
sleep 1
echo “hello again<br>”;
sleep 1
echo “and again<br>”;
sleep 1
echo “and again<br>”;
exit 0;

 
features/610.txt · Last modified: 2010/02/27 22:08 by muscardin
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Please visit Automatic Backlinks to start earning free backlinks Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki