Loading...
Searching...
No Matches
janus_nanomsg.c File Reference
Transports

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

## Macros

#define | JANUS_NANOMSG_VERSION 1
#define | JANUS_NANOMSG_VERSION_STRING "0.0.1"
#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
#define | JANUS_NANOMSG_ERROR_INVALID_REQUEST 411
#define | JANUS_NANOMSG_ERROR_MISSING_ELEMENT 412
#define | JANUS_NANOMSG_ERROR_INVALID_ELEMENT 413
#define | JANUS_NANOMSG_ERROR_UNKNOWN_ERROR 499

## Typedefs

typedef struct janus_nanomsg_client | janus_nanomsg_client

## Functions

janus_transport * | create (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_t * | janus_nanomsg_query_transport (json_t *request)
void * | janus_nanomsg_thread (void *data)

## Detailed Description

Janus Nanomsg transport plugin.

Author
  Lorenzo Miniero loren.nosp@m.zo@m.nosp@m.eetec.nosp@m.ho.c.nosp@m.om

Copyright
  GNU General Public License v3

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.

transports

## Macro Definition Documentation

## BUFFER_SIZE

#define BUFFER_SIZE 8192

## JANUS_NANOMSG_AUTHOR

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

## JANUS_NANOMSG_DESCRIPTION

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

## JANUS_NANOMSG_ERROR_INVALID_ELEMENT

#define JANUS_NANOMSG_ERROR_INVALID_ELEMENT 413

## JANUS_NANOMSG_ERROR_INVALID_REQUEST

#define JANUS_NANOMSG_ERROR_INVALID_REQUEST 411

## JANUS_NANOMSG_ERROR_MISSING_ELEMENT

#define JANUS_NANOMSG_ERROR_MISSING_ELEMENT 412

## JANUS_NANOMSG_ERROR_UNKNOWN_ERROR

#define JANUS_NANOMSG_ERROR_UNKNOWN_ERROR 499

## JANUS_NANOMSG_NAME

#define JANUS_NANOMSG_NAME "JANUS Nanomsg transport plugin"

## JANUS_NANOMSG_PACKAGE

#define JANUS_NANOMSG_PACKAGE "janus.transport.nanomsg"

## JANUS_NANOMSG_VERSION

#define JANUS_NANOMSG_VERSION 1

## JANUS_NANOMSG_VERSION_STRING

#define JANUS_NANOMSG_VERSION_STRING "0.0.1"

## 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 | ) |