Sample Adaptor.cpp File - MACROMEDIA FLASH MEDIA SERVER 2-MANAGING FLASH MEDIA SERVER Manual

Managing flash media server
Table of Contents

Advertisement

Sample Adaptor.cpp file

Here is an excerpt from the Adaptor.cpp file that you can modify to fit your local
authentication profile. Adaptor.cpp is a C++ file that contains the code for the Access DLL
module.
The corresponding file on Linux systems is called Makefile.access.
void SampleAdaptor::onAccess(IFCAccess* pAccess)
{
switch(pAccess->getType())
{
case IFCAccess::CONNECT:
{
%s\n", safestr(pAccess->getValue("c-referrer")) );
safestr(pAccess->getValue("s-uri")) );
%s\n", safestr(pAccess->getValue("c-user-agent")) );
%s\n", safestr(pAccess->getValue("c-ip")) );
*)malloc(STRING_VALUE_BUFFER_LEN);
connected %s\n", safestr(strValue) );
bytes-in %s\n", safestr(strValue) );
bytes-out %s\n", safestr(strValue) );
else.com");
safestr(pAccess->getValue("s-uri")) );
228
Flash Media Server Security
fprintf( stderr, "SampleAdaptor [Connect] referrer:
fprintf( stderr, "SampleAdaptor [Connect] uri: %s\n",
fprintf( stderr, "SampleAdaptor [Connect] user agent:
fprintf( stderr, "SampleAdaptor [Connect] client ip:
char *strValue = (char
memset((void *)strValue, 0, STRING_VALUE_BUFFER_LEN);
m_pCtx->getStats("s-connected", strValue);
fprintf( stderr, "SampleAdaptor [Connect] getStats,
m_pCtx->getStats("s-bytes-in", strValue);
fprintf( stderr, "SampleAdaptor [Connect] getStats,
m_pCtx->getStats("s-bytes-out", strValue);
fprintf( stderr, "SampleAdaptor [Connect] getStats,
// Reset the uri string.
pAccess->setValue("s-uri", "rtmp://this.somewhere-
//fprintf( stderr, "Adjusted [Connect] uri: %s\n",
pAccess->setValue("c-referrer", "new referrer");
pAccess->setValue("c-user-agent", "other user agent");
pAccess->setReadAccess("/", false);
pAccess->setWriteAccess("/", true);
break;

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MEDIA SERVER 2-MANAGING FLASH MEDIA SERVER and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash media server 2

Table of Contents