Fork me on GitHub
Data Structures | Macros | Typedefs | Functions | Variables
janus_pfunix.c File Reference

Janus Unix Sockets transport plugin. More...

#include "transport.h"
#include <arpa/inet.h>
#include <sys/socket.h>
#include <poll.h>
#include <sys/un.h>
#include "../debug.h"
#include "../apierror.h"
#include "../config.h"
#include "../mutex.h"
#include "../utils.h"
Include dependency graph for janus_pfunix.c:

Data Structures

struct  janus_pfunix_client


#define JANUS_PFUNIX_DESCRIPTION   "This transport plugin adds Unix Sockets support to the Janus API."
#define JANUS_PFUNIX_NAME   "JANUS Unix Sockets transport plugin"
#define JANUS_PFUNIX_AUTHOR   "Meetecho s.r.l."
#define JANUS_PFUNIX_PACKAGE   "janus.transport.pfunix"
#define BUFFER_SIZE   8192
#define UNIX_PATH_MAX   sizeof(sizecheck.sun_path)


typedef struct janus_pfunix_client janus_pfunix_client


janus_transportcreate (void)
int janus_pfunix_init (janus_transport_callbacks *callback, const char *config_path)
void janus_pfunix_destroy (void)
int janus_pfunix_get_api_compatibility (void)
int janus_pfunix_get_version (void)
const char * janus_pfunix_get_version_string (void)
const char * janus_pfunix_get_description (void)
const char * janus_pfunix_get_name (void)
const char * janus_pfunix_get_author (void)
const char * janus_pfunix_get_package (void)
gboolean janus_pfunix_is_janus_api_enabled (void)
gboolean janus_pfunix_is_admin_api_enabled (void)
int janus_pfunix_send_message (janus_transport_session *transport, void *request_id, gboolean admin, json_t *message)
void janus_pfunix_session_created (janus_transport_session *transport, guint64 session_id)
void janus_pfunix_session_over (janus_transport_session *transport, guint64 session_id, gboolean timeout, gboolean claimed)
void janus_pfunix_session_claimed (janus_transport_session *transport, guint64 session_id)
json_tjanus_pfunix_query_transport (json_t *request)
void * janus_pfunix_thread (void *data)


struct sockaddr_un sizecheck

Detailed Description

Janus Unix Sockets transport plugin.

Lorenzo Miniero
When you create a session using Unix Sockets, a subscription to the events related to it is done automatically, so no need for an explicit request as the GET in the plain HTTP API. Closing a client Unix Socket will also destroy all the sessions it created.


Macro Definition Documentation


#define BUFFER_SIZE   8192


#define JANUS_PFUNIX_AUTHOR   "Meetecho s.r.l."


#define JANUS_PFUNIX_DESCRIPTION   "This transport plugin adds Unix Sockets support to the Janus API."










#define JANUS_PFUNIX_NAME   "JANUS Unix Sockets transport plugin"


#define JANUS_PFUNIX_PACKAGE   "janus.transport.pfunix"






#define UNIX_PATH_MAX   sizeof(sizecheck.sun_path)

Typedef Documentation

◆ janus_pfunix_client

Function Documentation

◆ create()

janus_transport* create ( void  )

◆ janus_pfunix_destroy()

void janus_pfunix_destroy ( void  )

◆ janus_pfunix_get_api_compatibility()

int janus_pfunix_get_api_compatibility ( void  )

◆ janus_pfunix_get_author()

const char * janus_pfunix_get_author ( void  )

◆ janus_pfunix_get_description()

const char * janus_pfunix_get_description ( void  )

◆ janus_pfunix_get_name()

const char * janus_pfunix_get_name ( void  )

◆ janus_pfunix_get_package()

const char * janus_pfunix_get_package ( void  )

◆ janus_pfunix_get_version()

int janus_pfunix_get_version ( void  )

◆ janus_pfunix_get_version_string()

const char * janus_pfunix_get_version_string ( void  )

◆ janus_pfunix_init()

int janus_pfunix_init ( janus_transport_callbacks callback,
const char *  config_path 

◆ janus_pfunix_is_admin_api_enabled()

gboolean janus_pfunix_is_admin_api_enabled ( void  )

◆ janus_pfunix_is_janus_api_enabled()

gboolean janus_pfunix_is_janus_api_enabled ( void  )

◆ janus_pfunix_query_transport()

json_t * janus_pfunix_query_transport ( json_t request)

◆ janus_pfunix_send_message()

int janus_pfunix_send_message ( janus_transport_session transport,
void *  request_id,
gboolean  admin,
json_t message 

◆ janus_pfunix_session_claimed()

void janus_pfunix_session_claimed ( janus_transport_session transport,
guint64  session_id 

◆ janus_pfunix_session_created()

void janus_pfunix_session_created ( janus_transport_session transport,
guint64  session_id 

◆ janus_pfunix_session_over()

void janus_pfunix_session_over ( janus_transport_session transport,
guint64  session_id,
gboolean  timeout,
gboolean  claimed 

◆ janus_pfunix_thread()

void * janus_pfunix_thread ( void *  data)

Variable Documentation

◆ sizecheck

struct sockaddr_un sizecheck