Fork me on GitHub
No Matches
Data Structures | Macros | Typedefs | Functions
janus_nanomsg.c File Reference

Janus Nanomsg transport plugin. More...

#include "transport.h"
#include <nanomsg/nn.h>
#include <nanomsg/pair.h>
#include <nanomsg/inproc.h>
#include <nanomsg/ipc.h>
#include <nanomsg/pipeline.h>
#include "../debug.h"
#include "../apierror.h"
#include "../config.h"
#include "../mutex.h"
#include "../utils.h"
Include dependency graph for janus_nanomsg.c:

Data Structures

struct  janus_nanomsg_client


#define JANUS_NANOMSG_DESCRIPTION   "This transport plugin adds Nanomsg support to the Janus API."
#define JANUS_NANOMSG_NAME   "JANUS Nanomsg transport plugin"
#define JANUS_NANOMSG_AUTHOR   "Meetecho s.r.l."
#define JANUS_NANOMSG_PACKAGE   "janus.transport.nanomsg"
#define BUFFER_SIZE   8192


typedef struct janus_nanomsg_client janus_nanomsg_client


janus_transportcreate (void)
int janus_nanomsg_init (janus_transport_callbacks *callback, const char *config_path)
void janus_nanomsg_destroy (void)
int janus_nanomsg_get_api_compatibility (void)
int janus_nanomsg_get_version (void)
const char * janus_nanomsg_get_version_string (void)
const char * janus_nanomsg_get_description (void)
const char * janus_nanomsg_get_name (void)
const char * janus_nanomsg_get_author (void)
const char * janus_nanomsg_get_package (void)
gboolean janus_nanomsg_is_janus_api_enabled (void)
gboolean janus_nanomsg_is_admin_api_enabled (void)
int janus_nanomsg_send_message (janus_transport_session *transport, void *request_id, gboolean admin, json_t *message)
void janus_nanomsg_session_created (janus_transport_session *transport, guint64 session_id)
void janus_nanomsg_session_over (janus_transport_session *transport, guint64 session_id, gboolean timeout, gboolean claimed)
void janus_nanomsg_session_claimed (janus_transport_session *transport, guint64 session_id)
json_tjanus_nanomsg_query_transport (json_t *request)
void * janus_nanomsg_thread (void *data)

Detailed Description

Janus Nanomsg transport plugin.

Lorenzo Miniero

This is an implementation of a Nanomsg transport for the Janus API. This means that, with the help of this module, local and remote applications can use Nanomsg to make requests to Janus. Note that not all the protocols Nanomsg implements are made available in this plugin: specifically, you'll only be able to use the NN_PAIR transport mechanism. Future versions may implement more, but for the time being these should be enough to cover most development requirements.


Macro Definition Documentation


#define BUFFER_SIZE   8192


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


#define JANUS_NANOMSG_DESCRIPTION   "This transport plugin adds Nanomsg support to the Janus API."










#define JANUS_NANOMSG_NAME   "JANUS Nanomsg transport plugin"


#define JANUS_NANOMSG_PACKAGE   "janus.transport.nanomsg"





Typedef Documentation

◆ janus_nanomsg_client

typedef struct janus_nanomsg_client janus_nanomsg_client

Function Documentation

◆ create()

janus_transport * create ( void )

◆ janus_nanomsg_destroy()

void janus_nanomsg_destroy ( void )

◆ janus_nanomsg_get_api_compatibility()

int janus_nanomsg_get_api_compatibility ( void )

◆ janus_nanomsg_get_author()

const char * janus_nanomsg_get_author ( void )

◆ janus_nanomsg_get_description()

const char * janus_nanomsg_get_description ( void )

◆ janus_nanomsg_get_name()

const char * janus_nanomsg_get_name ( void )

◆ janus_nanomsg_get_package()

const char * janus_nanomsg_get_package ( void )

◆ janus_nanomsg_get_version()

int janus_nanomsg_get_version ( void )

◆ janus_nanomsg_get_version_string()

const char * janus_nanomsg_get_version_string ( void )

◆ janus_nanomsg_init()

int janus_nanomsg_init ( janus_transport_callbacks * callback,
const char * config_path )

◆ janus_nanomsg_is_admin_api_enabled()

gboolean janus_nanomsg_is_admin_api_enabled ( void )

◆ janus_nanomsg_is_janus_api_enabled()

gboolean janus_nanomsg_is_janus_api_enabled ( void )

◆ janus_nanomsg_query_transport()

json_t * janus_nanomsg_query_transport ( json_t * request)

◆ janus_nanomsg_send_message()

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

◆ janus_nanomsg_session_claimed()

void janus_nanomsg_session_claimed ( janus_transport_session * transport,
guint64 session_id )

◆ janus_nanomsg_session_created()

void janus_nanomsg_session_created ( janus_transport_session * transport,
guint64 session_id )

◆ janus_nanomsg_session_over()

void janus_nanomsg_session_over ( janus_transport_session * transport,
guint64 session_id,
gboolean timeout,
gboolean claimed )

◆ janus_nanomsg_thread()

void * janus_nanomsg_thread ( void * data)