signaling

package module
v1.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2024 License: AGPL-3.0 Imports: 64 Imported by: 0

README

Spreed standalone signaling server

Build Status Coverage Status Documentation Status Go Report

This repository contains the standalone signaling server which can be used for Nextcloud Talk (https://apps.nextcloud.com/apps/spreed).

See https://nextcloud-spreed-signaling.readthedocs.io/en/latest/ for further information on the API of the signaling server.

Building

The following tools are required for building the signaling server.

  • git
  • go >= 1.20
  • make
  • protobuf-compiler >= 3

Usually the last two versions of Go are supported. This follows the release policy of Go: https://go.dev/doc/devel/release#policy

All other dependencies are fetched automatically while building.

$ make build

or on FreeBSD

$ gmake build

Afterwards the binary is created as bin/signaling.

Configuration

A default configuration file is included as server.conf.in. Copy this to server.conf and adjust as necessary for the local setup. See the file for comments about the different parameters that can be changed.

Running

The signaling server connects to a NATS server (https://nats.io/) to distribute messages between different instances. See the NATS documentation on how to set up a server and run it.

Once the NATS server is running (and the URL to it is configured for the signaling server), you can start the signaling server.

$ ./bin/signaling

By default, the configuration is loaded from server.conf in the current directory, but a different path can be passed through the --config option.

$ ./bin/signaling --config /etc/signaling/server.conf
Running as daemon
systemd

Create a dedicated group and user:

sudo groupadd --system signaling
sudo useradd --system \
    --gid signaling \
    --shell /usr/sbin/nologin \
    --comment "Standalone signaling server for Nextcloud Talk." \
    signaling

Copy server.conf.in to /etc/signaling/server.conf and fix permissions:

sudo chmod 600 /etc/signaling/server.conf
sudo chown signaling: /etc/signaling/server.conf

Copy dist/init/systemd/signaling.service to /etc/systemd/system/signaling.service (adjust abs. path in ExecStart to match your binary location!)

Enable and start service:

systemctl enable signaling.service
systemctl start signaling.service
Running with Docker

Official docker containers for the signaling server and -proxy are available on Docker Hub at https://hub.docker.com/r/strukturag/nextcloud-spreed-signaling

See the README.md in the docker subfolder for details.

Docker Compose

You will likely have to adjust the Janus command line options depending on the exact network configuration on your server. Refer to Setup of Janus and the Janus documentation for how to configure your Janus server.

Copy server.conf.in to server.conf and adjust it to your liking.

If you're using the docker-compose.yml configuration as is, the MCU Url must be set to ws://localhost:8188, the NATS Url must be set to nats://localhost:4222, and TURN Servers must be set to turn:localhost:3478?transport=udp,turn:localhost:3478?transport=tcp.

docker-compose build
docker-compose up -d

Please note that docker-compose v2 is required for building while most distributions will ship older versions. You can download a recent version from https://docs.docker.com/compose/install/

Setup of NATS server

There is a detailed description on how to install and run the NATS server available at https://docs.nats.io/running-a-nats-service/introduction

You can use the gnatsd.conf file as base for the configuration of the NATS server.

Setup of Janus

A Janus server (from https://github.com/meetecho/janus-gateway) can be used to act as a WebRTC gateway. See the documentation of Janus on how to configure and run the server. At least the VideoRoom plugin and the websocket transport of Janus must be enabled.

The signaling server uses the VideoRoom plugin of Janus to manage sessions. All gateway details are hidden from the clients, all messages are sent through the signaling server. Only WebRTC media is exchanged directly between the gateway and the clients.

Edit the server.conf and enter the URL to the websocket endpoint of Janus in the section [mcu] and key url. During startup, the signaling server will connect to Janus and log information of the gateway.

The maximum bandwidth per publishing stream can also be configured in the section [mcu], see properties maxstreambitrate and maxscreenbitrate.

Use multiple Janus servers

To scale the setup and add high availability, a signaling server can connect to one or multiple proxy servers that each provide access to a single Janus server.

For that, set the type key in section [mcu] to proxy and set url to a space-separated list of URLs where a proxy server is running.

Each signaling server that connects to a proxy needs a unique token id and a public / private RSA keypair. The token id must be configured as token_id in section [mcu], the path to the private key file as token_key.

Setup of proxy server

The proxy server is built with the standard make command make build as bin/proxy binary. Copy the proxy.conf.in as proxy.conf and edit section [tokens] to the list of allowed token ids and filenames of the public keys for each token id. See the comments in proxy.conf.in for other configuration options.

When the proxy process receives a SIGHUP signal, the list of allowed token ids / public keys is reloaded. A SIGUSR1 signal can be used to shutdown a proxy process gracefully after all clients have been disconnected. No new publishers will be accepted in this case.

Clustering

The signaling server supports a clustering mode where multiple running servers can be interconnected to form a single "virtual" server. This can be used to increase the capacity of the signaling server or provide a failover setup.

For that a central NATS server / cluster must be used by all instances. Each instance must run a GRPC server (enable listening in section grpc and optionally setup certificate, private key and CA). The list of other GRPC targets must be configured as targets in section grpc or can be retrieved from an etcd cluster. See server.conf.in in section grpc for configuration details.

Setup of frontend webserver

Usually the standalone signaling server is running behind a webserver that does the SSL protocol or acts as a load balancer for multiple signaling servers.

The configuration examples below assume a pre-configured webserver (nginx or Apache) with a working HTTPS setup, that is listening on the external interface of the server hosting the standalone signaling server.

After everything has been set up, the configuration can be tested using curl:

$ curl -i https://myserver.domain.invalid/standalone-signaling/api/v1/welcome
HTTP/1.1 200 OK
Date: Thu, 05 Jul 2018 09:28:08 GMT
Server: nextcloud-spreed-signaling/1.0.0
Content-Type: application/json; charset=utf-8
Content-Length: 59

{"nextcloud-spreed-signaling":"Welcome","version":"1.0.0"}
nginx

Nginx can be used as frontend for the standalone signaling server without any additional requirements.

The backend should be configured separately so it can be changed in a single location and also to allow using multiple backends from a single frontend server.

Assuming the standalone signaling server is running on the local interface on port 8080 below, add the following block to the nginx server definition in /etc/nginx/sites-enabled (just before the server definition):

upstream signaling {
    server 127.0.0.1:8080;
}

To proxy all requests for the standalone signaling to the correct backend, the following location block must be added inside the server definition of the same file:

location /standalone-signaling/ {
    proxy_pass http://signaling/;
    proxy_http_version 1.1;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location /standalone-signaling/spreed {
    proxy_pass http://signaling/spreed;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

Example (e.g. /etc/nginx/sites-enabled/default):

upstream signaling {
    server 127.0.0.1:8080;
}

server {
    listen 443 ssl http2;
    server_name myserver.domain.invalid;

    # ... other existing configuration ...

    location /standalone-signaling/ {
        proxy_pass http://signaling/;
        proxy_http_version 1.1;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }

    location /standalone-signaling/spreed {
        proxy_pass http://signaling/spreed;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}
Apache

To configure the Apache webservice as frontend for the standalone signaling server, the modules mod_proxy_http and mod_proxy_wstunnel must be enabled so WebSocket and API backend requests can be proxied:

$ sudo a2enmod proxy
$ sudo a2enmod proxy_http
$ sudo a2enmod proxy_wstunnel

Now the Apache VirtualHost configuration can be extended to forward requests to the standalone signaling server (assuming the server is running on the local interface on port 8080 below):

<VirtualHost *:443>

    # ... existing configuration ...

    # Enable proxying Websocket requests to the standalone signaling server.
    ProxyPass "/standalone-signaling/"  "ws://127.0.0.1:8080/"

    RewriteEngine On
    # Websocket connections from the clients.
    RewriteRule ^/standalone-signaling/spreed/$ - [L]
    # Backend connections from Nextcloud.
    RewriteRule ^/standalone-signaling/api/(.*) http://127.0.0.1:8080/api/$1 [L,P]

    # ... existing configuration ...

</VirtualHost>
Caddy
v1

Caddy (v1) configuration:

myserver.domain.invalid {
  proxy /standalone-signaling/ http://127.0.0.1:8080 {
    without /standalone-signaling
    transparent
    websocket
  }
}
v2

Caddy (v2) configuration:

myserver.domain.invalid {
  route /standalone-signaling/* {
    uri strip_prefix /standalone-signaling
    reverse_proxy http://127.0.0.1:8080
  }
}

Setup of Nextcloud Talk

Login to your Nextcloud as admin and open the additional settings page. Scroll down to the "Talk" section and enter the base URL of your standalone signaling server in the field "External signaling server". Please note that you have to use https if your Nextcloud is also running on https. Usually you should enter https://myhostname/standalone-signaling as URL.

The value "Shared secret for external signaling server" must be the same as the property secret in section backend of your server.conf.

If you are using a self-signed certificate for development, you need to uncheck the box Validate SSL certificate so backend requests from Nextcloud to the signaling server can be performed.

Benchmarking the server

A simple client exists to benchmark the server. Please note that the features that are benchmarked might not cover the whole functionality, check the implementation in src/client for details on the client.

To authenticate new client connections to the signaling server, the client starts a dummy authentication handler on a local interface and passes the URL in the hello request. Therefore the signaling server should be configured to allow all backend hosts (option allowall in section backend).

The client is not compiled by default, but can be using the client target:

$ make client

Usage:

$ ./bin/client
Usage of ./bin/client:
  -addr string
        http service address (default "localhost:28080")
  -config string
        config file to use (default "server.conf")
  -maxClients int
        number of client connections (default 100)

Documentation

Overview

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2023 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2022 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2017 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2022 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2020 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2017 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2022 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2022 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2017 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2020 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2021 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2017 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2022 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2022 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2022 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2022 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2022 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2023 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2017 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2021 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2017 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2023 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2017 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2023 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2020 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2023 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2022 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2024 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2023 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2019 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2022 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2022 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2022 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2022 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2017 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2024 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2017 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2021 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2017 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2017 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2017 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2020 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2021 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2017 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2017 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2021 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2023 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2023 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2023 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2017 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2022 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2021 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2019 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2019 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2019 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2022 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2021 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2021 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

*

  • Standalone signaling server for the Nextcloud Spreed app.
  • Copyright (C) 2019 struktur AG *
  • @author Joachim Bauch <bauch@struktur.de> *
  • @license GNU AGPL version 3 or any later version *
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Affero General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version. *
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU Affero General Public License for more details. *
  • You should have received a copy of the GNU Affero General Public License
  • along with this program. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

View Source
const (
	BackendVersion = "1.0"

	HeaderBackendSignalingRandom   = "Spreed-Signaling-Random"
	HeaderBackendSignalingChecksum = "Spreed-Signaling-Checksum"
	HeaderBackendServer            = "Spreed-Signaling-Backend"

	ConfigGroupSignaling = "signaling"

	ConfigKeyHelloV2TokenKey  = "hello-v2-token-key"
	ConfigKeySessionPingLimit = "session-ping-limit"
)
View Source
const (
	// Version 1.0 validates auth params against the Nextcloud instance.
	HelloVersionV1 = "1.0"

	// Version 2.0 validates auth params encoded as JWT.
	HelloVersionV2 = "2.0"
)
View Source
const (
	HelloClientTypeClient   = "client"
	HelloClientTypeInternal = "internal"

	HelloClientTypeVirtual = "virtual"
)
View Source
const (
	// Features to send to all clients.
	ServerFeatureMcu                   = "mcu"
	ServerFeatureSimulcast             = "simulcast"
	ServerFeatureUpdateSdp             = "update-sdp"
	ServerFeatureAudioVideoPermissions = "audio-video-permissions"
	ServerFeatureTransientData         = "transient-data"
	ServerFeatureInCallAll             = "incall-all"
	ServerFeatureWelcome               = "welcome"
	ServerFeatureHelloV2               = "hello-v2"
	ServerFeatureSwitchTo              = "switchto"
	ServerFeatureDialout               = "dialout"

	// Features to send to internal clients only.
	ServerFeatureInternalVirtualSessions = "virtual-sessions"

	// Possible client features from the "hello" request.
	ClientFeatureInternalInCall = "internal-incall"
	ClientFeatureStartDialout   = "start-dialout"
)
View Source
const (
	RecipientTypeSession = "session"
	RecipientTypeUser    = "user"
	RecipientTypeRoom    = "room"
)
View Source
const (
	DisinviteReasonDisinvited = "disinvited"
	DisinviteReasonDeleted    = "deleted"
)
View Source
const (
	BackendTypeStatic = "static"
	BackendTypeEtcd   = "etcd"

	DefaultBackendType = BackendTypeStatic
)
View Source
const (
	// Name of the "Talk" app in Nextcloud.
	AppNameSpreed = "spreed"

	// Name of capability to enable the "v3" API for the signaling endpoint.
	FeatureSignalingV3Api = "signaling-v3"

	// Cache received capabilities for one hour.
	CapabilitiesCacheDuration = time.Hour
)
View Source
const (
	GrpcTargetTypeStatic = "static"
	GrpcTargetTypeEtcd   = "etcd"

	DefaultGrpcTargetType = GrpcTargetTypeStatic
)
View Source
const (
	/*! \brief Success (no error) */
	JANUS_OK = 0

	/*! \brief Unauthorized (can only happen when using apisecret/auth token) */
	JANUS_ERROR_UNAUTHORIZED = 403
	/*! \brief Unauthorized access to a plugin (can only happen when using auth token) */
	JANUS_ERROR_UNAUTHORIZED_PLUGIN = 405
	/*! \brief Unknown/undocumented error */
	JANUS_ERROR_UNKNOWN = 490
	/*! \brief Transport related error */
	JANUS_ERROR_TRANSPORT_SPECIFIC = 450
	/*! \brief The request is missing in the message */
	JANUS_ERROR_MISSING_REQUEST = 452
	/*! \brief The gateway does not suppurt this request */
	JANUS_ERROR_UNKNOWN_REQUEST = 453
	/*! \brief The payload is not a valid JSON message */
	JANUS_ERROR_INVALID_JSON = 454
	/*! \brief The object is not a valid JSON object as expected */
	JANUS_ERROR_INVALID_JSON_OBJECT = 455
	/*! \brief A mandatory element is missing in the message */
	JANUS_ERROR_MISSING_MANDATORY_ELEMENT = 456
	/*! \brief The request cannot be handled for this webserver path  */
	JANUS_ERROR_INVALID_REQUEST_PATH = 457
	/*! \brief The session the request refers to doesn't exist */
	JANUS_ERROR_SESSION_NOT_FOUND = 458
	/*! \brief The handle the request refers to doesn't exist */
	JANUS_ERROR_HANDLE_NOT_FOUND = 459
	/*! \brief The plugin the request wants to talk to doesn't exist */
	JANUS_ERROR_PLUGIN_NOT_FOUND = 460
	/*! \brief An error occurring when trying to attach to a plugin and create a handle  */
	JANUS_ERROR_PLUGIN_ATTACH = 461
	/*! \brief An error occurring when trying to send a message/request to the plugin */
	JANUS_ERROR_PLUGIN_MESSAGE = 462
	/*! \brief An error occurring when trying to detach from a plugin and destroy the related handle  */
	JANUS_ERROR_PLUGIN_DETACH = 463
	/*! \brief The gateway doesn't support this SDP type
	 * \todo The gateway currently only supports OFFER and ANSWER. */
	JANUS_ERROR_JSEP_UNKNOWN_TYPE = 464
	/*! \brief The Session Description provided by the peer is invalid */
	JANUS_ERROR_JSEP_INVALID_SDP = 465
	/*! \brief The stream a trickle candidate for does not exist or is invalid */
	JANUS_ERROR_TRICKE_INVALID_STREAM = 466
	/*! \brief A JSON element is of the wrong type (e.g., an integer instead of a string) */
	JANUS_ERROR_INVALID_ELEMENT_TYPE = 467
	/*! \brief The ID provided to create a new session is already in use */
	JANUS_ERROR_SESSION_CONFLICT = 468
	/*! \brief We got an ANSWER to an OFFER we never made */
	JANUS_ERROR_UNEXPECTED_ANSWER = 469
	/*! \brief The auth token the request refers to doesn't exist */
	JANUS_ERROR_TOKEN_NOT_FOUND = 470

	// Error codes of videoroom plugin.
	JANUS_VIDEOROOM_ERROR_UNKNOWN_ERROR     = 499
	JANUS_VIDEOROOM_ERROR_NO_MESSAGE        = 421
	JANUS_VIDEOROOM_ERROR_INVALID_JSON      = 422
	JANUS_VIDEOROOM_ERROR_INVALID_REQUEST   = 423
	JANUS_VIDEOROOM_ERROR_JOIN_FIRST        = 424
	JANUS_VIDEOROOM_ERROR_ALREADY_JOINED    = 425
	JANUS_VIDEOROOM_ERROR_NO_SUCH_ROOM      = 426
	JANUS_VIDEOROOM_ERROR_ROOM_EXISTS       = 427
	JANUS_VIDEOROOM_ERROR_NO_SUCH_FEED      = 428
	JANUS_VIDEOROOM_ERROR_MISSING_ELEMENT   = 429
	JANUS_VIDEOROOM_ERROR_INVALID_ELEMENT   = 430
	JANUS_VIDEOROOM_ERROR_INVALID_SDP_TYPE  = 431
	JANUS_VIDEOROOM_ERROR_PUBLISHERS_FULL   = 432
	JANUS_VIDEOROOM_ERROR_UNAUTHORIZED      = 433
	JANUS_VIDEOROOM_ERROR_ALREADY_PUBLISHED = 434
	JANUS_VIDEOROOM_ERROR_NOT_PUBLISHED     = 435
	JANUS_VIDEOROOM_ERROR_ID_EXISTS         = 436
	JANUS_VIDEOROOM_ERROR_INVALID_SDP       = 437
)
View Source
const (
	McuTypeJanus = "janus"
	McuTypeProxy = "proxy"

	McuTypeDefault = McuTypeJanus
)
View Source
const (
	// Must match values in "Participant.php" from Nextcloud Talk.
	FlagDisconnected = 0
	FlagInCall       = 1
	FlagWithAudio    = 2
	FlagWithVideo    = 4
	FlagWithPhone    = 8
)
View Source
const (
	FLAG_MUTED_SPEAKING  = 1
	FLAG_MUTED_LISTENING = 2
	FLAG_TALKING         = 4
)
View Source
const (
	NatsLoopbackUrl = "nats://loopback"
)

Variables

View Source
var (
	ErrNotRedirecting         = errors.New("not redirecting to different host")
	ErrUnsupportedContentType = errors.New("unsupported_content_type")

	ErrIncompleteResponse = errors.New("incomplete OCS response")
	ErrThrottledResponse  = errors.New("throttled OCS response")
)
View Source
var (
	DuplicateClient     = NewError("duplicate_client", "Client already registered.")
	HelloExpected       = NewError("hello_expected", "Expected Hello request.")
	InvalidHelloVersion = NewError("invalid_hello_version", "The hello version is not supported.")
	UserAuthFailed      = NewError("auth_failed", "The user could not be authenticated.")
	RoomJoinFailed      = NewError("room_join_failed", "Could not join the room.")
	InvalidClientType   = NewError("invalid_client_type", "The client type is not supported.")
	InvalidBackendUrl   = NewError("invalid_backend", "The backend URL is not supported.")
	InvalidToken        = NewError("invalid_token", "The passed token is invalid.")
	NoSuchSession       = NewError("no_such_session", "The session to resume does not exist.")
	TokenNotValidYet    = NewError("token_not_valid_yet", "The token is not valid yet.")
	TokenExpired        = NewError("token_expired", "The token is expired.")
)
View Source
var (
	ContinentMap = map[string][]string{}/* 249 elements not displayed */

)
View Source
var (
	ErrDatabaseNotInitialized = fmt.Errorf("GeoIP database not initialized yet")
)
View Source
var (
	ErrNoSuchRoomSession = fmt.Errorf("unknown room session id")
)
View Source
var (
	ErrNotConnected = fmt.Errorf("not connected")
)
View Source
var (
	GrpcServerId string
)
View Source
var (
	InvalidFormat = NewError("invalid_format", "Invalid data format.")
)
View Source
var (
	PathToOcsSignalingBackend = "ocs/v2.php/apps/spreed/api/v1/signaling/backend"
)
View Source
var (
	SessionLimitExceeded = NewError("session_limit_exceeded", "Too many sessions connected for this backend.")
)

Functions

func AddBackendChecksum

func AddBackendChecksum(r *http.Request, body []byte, secret []byte)

func CalculateBackendChecksum

func CalculateBackendChecksum(random string, body []byte, secret []byte) string

func ContinentsOverlap

func ContinentsOverlap(a, b []string) bool

func GetEncodedSubject

func GetEncodedSubject(prefix string, suffix string) string

The NATS client doesn't work if a subject contains spaces. As the room id can have an arbitrary format, we need to make sure the subject is valid. See "https://github.com/nats-io/nats.js/issues/158" for a similar report.

func GetGeoIpDownloadUrl

func GetGeoIpDownloadUrl(license string) string

func GetStringOptions added in v1.2.2

func GetStringOptions(config *goconf.ConfigFile, section string, ignoreErrors bool) (map[string]string, error)

func GetSubjectForBackendRoomId

func GetSubjectForBackendRoomId(roomId string, backend *Backend) string

func GetSubjectForRoomId

func GetSubjectForRoomId(roomId string, backend *Backend) string

func GetSubjectForSessionId added in v1.0.0

func GetSubjectForSessionId(sessionId string, backend *Backend) string

func GetSubjectForUserId

func GetSubjectForUserId(userId string, backend *Backend) string

func GetVirtualSessionId

func GetVirtualSessionId(session *ClientSession, sessionId string) string

func IsInCall

func IsInCall(value interface{}) (bool, bool)

func IsValidContinent added in v0.4.0

func IsValidContinent(continent string) bool

func IsValidCountry

func IsValidCountry(country string) bool

func IsValidStreamType added in v1.2.4

func IsValidStreamType(s string) bool

func LookupContinents

func LookupContinents(country string) []string

func NewReloadableCredentials added in v1.0.0

func NewReloadableCredentials(config *goconf.ConfigFile, server bool) (credentials.TransportCredentials, error)

func RegisterBackendConfigurationStats added in v0.4.0

func RegisterBackendConfigurationStats()

func RegisterClientStats added in v0.4.0

func RegisterClientStats()

func RegisterGrpcClientStats added in v1.0.0

func RegisterGrpcClientStats()

func RegisterGrpcServerStats added in v1.0.0

func RegisterGrpcServerStats()

func RegisterHttpClientPoolStats added in v1.2.4

func RegisterHttpClientPoolStats()

func RegisterHubStats added in v0.4.0

func RegisterHubStats()

func RegisterJanusMcuStats added in v0.4.0

func RegisterJanusMcuStats()

func RegisterProxyMcuStats added in v0.4.0

func RegisterProxyMcuStats()

func RegisterRoomStats added in v0.4.0

func RegisterRoomStats()

func RegisterStats added in v0.4.0

func RegisterStats()

func UnregisterJanusMcuStats added in v0.4.0

func UnregisterJanusMcuStats()

func UnregisterProxyMcuStats added in v0.4.0

func UnregisterProxyMcuStats()

func ValidateBackendChecksum

func ValidateBackendChecksum(r *http.Request, body []byte, secret []byte) bool

func ValidateBackendChecksumValue

func ValidateBackendChecksumValue(checksum string, random string, body []byte, secret []byte) bool

func WrapSyscallConn added in v1.0.0

func WrapSyscallConn(rawConn, newConn net.Conn) net.Conn

WrapSyscallConn tries to wrap rawConn and newConn into a net.Conn that implements syscall.Conn. rawConn will be used to support syscall, and newConn will be used for read/write.

This function returns newConn if rawConn doesn't implement syscall.Conn.

Types

type AddSessionInternalClientMessage

type AddSessionInternalClientMessage struct {
	CommonSessionInternalClientMessage

	UserId string           `json:"userid,omitempty"`
	User   *json.RawMessage `json:"user,omitempty"`
	Flags  uint32           `json:"flags,omitempty"`
	InCall *int             `json:"incall,omitempty"`

	Options *AddSessionOptions `json:"options,omitempty"`
}

func (*AddSessionInternalClientMessage) CheckValid

func (m *AddSessionInternalClientMessage) CheckValid() error

type AddSessionOptions

type AddSessionOptions struct {
	ActorId   string `json:"actorId,omitempty"`
	ActorType string `json:"actorType,omitempty"`
}

type AllowedIps added in v1.1.3

type AllowedIps struct {
	// contains filtered or unexported fields
}

func DefaultAllowedIps added in v1.1.3

func DefaultAllowedIps() *AllowedIps

func ParseAllowedIps added in v1.1.3

func ParseAllowedIps(allowed string) (*AllowedIps, error)

func (*AllowedIps) Allowed added in v1.1.3

func (a *AllowedIps) Allowed(ip net.IP) bool

func (*AllowedIps) Empty added in v1.1.3

func (a *AllowedIps) Empty() bool

type AnswerOfferMessage

type AnswerOfferMessage struct {
	To       string                 `json:"to"`
	From     string                 `json:"from"`
	Type     string                 `json:"type"`
	RoomType string                 `json:"roomType"`
	Payload  map[string]interface{} `json:"payload"`
	Sid      string                 `json:"sid,omitempty"`
}

type AsyncBackendRoomEventListener added in v1.0.0

type AsyncBackendRoomEventListener interface {
	ProcessBackendRoomRequest(message *AsyncMessage)
}

type AsyncEvents added in v1.0.0

type AsyncEvents interface {
	Close()

	RegisterBackendRoomListener(roomId string, backend *Backend, listener AsyncBackendRoomEventListener) error
	UnregisterBackendRoomListener(roomId string, backend *Backend, listener AsyncBackendRoomEventListener)

	RegisterRoomListener(roomId string, backend *Backend, listener AsyncRoomEventListener) error
	UnregisterRoomListener(roomId string, backend *Backend, listener AsyncRoomEventListener)

	RegisterUserListener(userId string, backend *Backend, listener AsyncUserEventListener) error
	UnregisterUserListener(userId string, backend *Backend, listener AsyncUserEventListener)

	RegisterSessionListener(sessionId string, backend *Backend, listener AsyncSessionEventListener) error
	UnregisterSessionListener(sessionId string, backend *Backend, listener AsyncSessionEventListener)

	PublishBackendRoomMessage(roomId string, backend *Backend, message *AsyncMessage) error
	PublishRoomMessage(roomId string, backend *Backend, message *AsyncMessage) error
	PublishUserMessage(userId string, backend *Backend, message *AsyncMessage) error
	PublishSessionMessage(sessionId string, backend *Backend, message *AsyncMessage) error
}

func NewAsyncEvents added in v1.0.0

func NewAsyncEvents(url string) (AsyncEvents, error)

func NewAsyncEventsNats added in v1.0.0

func NewAsyncEventsNats(client NatsClient) (AsyncEvents, error)

type AsyncMessage added in v1.0.0

type AsyncMessage struct {
	SendTime time.Time `json:"sendtime"`

	Type string `json:"type"`

	Message *ServerMessage `json:"message,omitempty"`

	Room *BackendServerRoomRequest `json:"room,omitempty"`

	Permissions []Permission `json:"permissions,omitempty"`

	AsyncRoom *AsyncRoomMessage `json:"asyncroom,omitempty"`

	SendOffer *SendOfferMessage `json:"sendoffer,omitempty"`

	Id string `json:"id"`
}

func (*AsyncMessage) String added in v1.2.0

func (m *AsyncMessage) String() string

type AsyncRoomEventListener added in v1.0.0

type AsyncRoomEventListener interface {
	ProcessAsyncRoomMessage(message *AsyncMessage)
}

type AsyncRoomMessage added in v1.0.0

type AsyncRoomMessage struct {
	Type string `json:"type"`

	SessionId  string `json:"sessionid,omitempty"`
	ClientType string `json:"clienttype,omitempty"`
}

type AsyncSessionEventListener added in v1.0.0

type AsyncSessionEventListener interface {
	ProcessAsyncSessionMessage(message *AsyncMessage)
}

type AsyncUserEventListener added in v1.0.0

type AsyncUserEventListener interface {
	ProcessAsyncUserMessage(message *AsyncMessage)
}

type Backend

type Backend struct {
	// contains filtered or unexported fields
}

func (*Backend) AddSession

func (b *Backend) AddSession(session Session) error

func (*Backend) Id

func (b *Backend) Id() string

func (*Backend) IsCompat

func (b *Backend) IsCompat() bool

func (*Backend) IsUrlAllowed added in v0.4.0

func (b *Backend) IsUrlAllowed(u *url.URL) bool

func (*Backend) Len added in v1.0.0

func (b *Backend) Len() int

func (*Backend) Limit added in v1.0.0

func (b *Backend) Limit() int

func (*Backend) ParsedUrl added in v1.0.0

func (b *Backend) ParsedUrl() *url.URL

func (*Backend) RemoveSession

func (b *Backend) RemoveSession(session Session)

func (*Backend) Secret

func (b *Backend) Secret() []byte

func (*Backend) Url added in v1.0.0

func (b *Backend) Url() string

type BackendClient

type BackendClient struct {
	// contains filtered or unexported fields
}

func NewBackendClient

func NewBackendClient(config *goconf.ConfigFile, maxConcurrentRequestsPerHost int, version string, etcdClient *EtcdClient) (*BackendClient, error)

func (*BackendClient) Close added in v1.0.0

func (b *BackendClient) Close()

func (*BackendClient) GetBackend

func (b *BackendClient) GetBackend(u *url.URL) *Backend

func (*BackendClient) GetBackends

func (b *BackendClient) GetBackends() []*Backend

func (*BackendClient) GetCompatBackend

func (b *BackendClient) GetCompatBackend() *Backend

func (*BackendClient) IsUrlAllowed

func (b *BackendClient) IsUrlAllowed(u *url.URL) bool

func (*BackendClient) PerformJSONRequest

func (b *BackendClient) PerformJSONRequest(ctx context.Context, u *url.URL, request interface{}, response interface{}) error

PerformJSONRequest sends a JSON POST request to the given url and decodes the result into "response".

func (*BackendClient) Reload

func (b *BackendClient) Reload(config *goconf.ConfigFile)

type BackendClientAuthRequest

type BackendClientAuthRequest struct {
	Version string           `json:"version"`
	Params  *json.RawMessage `json:"params"`
}

type BackendClientAuthResponse

type BackendClientAuthResponse struct {
	Version string           `json:"version"`
	UserId  string           `json:"userid"`
	User    *json.RawMessage `json:"user"`
}

type BackendClientPingRequest

type BackendClientPingRequest struct {
	Version string             `json:"version"`
	RoomId  string             `json:"roomid"`
	Entries []BackendPingEntry `json:"entries"`
}

type BackendClientRequest

type BackendClientRequest struct {
	json.Marshaler
	json.Unmarshaler

	Type string `json:"type"`

	Auth *BackendClientAuthRequest `json:"auth,omitempty"`

	Room *BackendClientRoomRequest `json:"room,omitempty"`

	Ping *BackendClientPingRequest `json:"ping,omitempty"`

	Session *BackendClientSessionRequest `json:"session,omitempty"`
}

func NewBackendClientAuthRequest

func NewBackendClientAuthRequest(params *json.RawMessage) *BackendClientRequest

func NewBackendClientPingRequest

func NewBackendClientPingRequest(roomid string, entries []BackendPingEntry) *BackendClientRequest

func NewBackendClientRoomRequest

func NewBackendClientRoomRequest(roomid string, userid string, sessionid string) *BackendClientRequest

func NewBackendClientSessionRequest

func NewBackendClientSessionRequest(roomid string, action string, sessionid string, msg *AddSessionInternalClientMessage) *BackendClientRequest

type BackendClientResponse

type BackendClientResponse struct {
	json.Marshaler
	json.Unmarshaler

	Type string `json:"type"`

	Error *Error `json:"error,omitempty"`

	Auth *BackendClientAuthResponse `json:"auth,omitempty"`

	Room *BackendClientRoomResponse `json:"room,omitempty"`

	Ping *BackendClientRingResponse `json:"ping,omitempty"`

	Session *BackendClientSessionResponse `json:"session,omitempty"`
}

type BackendClientRingResponse

type BackendClientRingResponse struct {
	Version string `json:"version"`
	RoomId  string `json:"roomid"`
}

type BackendClientRoomRequest

type BackendClientRoomRequest struct {
	Version   string `json:"version"`
	RoomId    string `json:"roomid"`
	Action    string `json:"action,omitempty"`
	UserId    string `json:"userid"`
	SessionId string `json:"sessionid"`

	// For Nextcloud Talk with SIP support.
	ActorId   string `json:"actorid,omitempty"`
	ActorType string `json:"actortype,omitempty"`
	InCall    int    `json:"incall,omitempty"`
}

type BackendClientRoomResponse

type BackendClientRoomResponse struct {
	Version    string           `json:"version"`
	RoomId     string           `json:"roomid"`
	Properties *json.RawMessage `json:"properties"`

	// Optional information about the Nextcloud Talk session. Can be used for
	// example to define a "userid" for otherwise anonymous users.
	// See "RoomSessionData" for a possible content.
	Session *json.RawMessage `json:"session,omitempty"`

	Permissions *[]Permission `json:"permissions,omitempty"`
}

type BackendClientSessionRequest

type BackendClientSessionRequest struct {
	Version   string           `json:"version"`
	RoomId    string           `json:"roomid"`
	Action    string           `json:"action"`
	SessionId string           `json:"sessionid"`
	UserId    string           `json:"userid,omitempty"`
	User      *json.RawMessage `json:"user,omitempty"`
}

type BackendClientSessionResponse

type BackendClientSessionResponse struct {
	Version string `json:"version"`
	RoomId  string `json:"roomid"`
}

type BackendConfiguration

type BackendConfiguration struct {
	// contains filtered or unexported fields
}

func NewBackendConfiguration

func NewBackendConfiguration(config *goconf.ConfigFile, etcdClient *EtcdClient) (*BackendConfiguration, error)

func (*BackendConfiguration) Close added in v1.0.0

func (b *BackendConfiguration) Close()

func (*BackendConfiguration) GetBackend

func (b *BackendConfiguration) GetBackend(u *url.URL) *Backend

func (*BackendConfiguration) GetBackends

func (b *BackendConfiguration) GetBackends() []*Backend

func (*BackendConfiguration) GetCompatBackend

func (b *BackendConfiguration) GetCompatBackend() *Backend

func (*BackendConfiguration) GetSecret

func (b *BackendConfiguration) GetSecret(u *url.URL) []byte

func (*BackendConfiguration) IsUrlAllowed

func (b *BackendConfiguration) IsUrlAllowed(u *url.URL) bool

func (*BackendConfiguration) Reload

func (b *BackendConfiguration) Reload(config *goconf.ConfigFile)

type BackendInformationEtcd added in v1.0.0

type BackendInformationEtcd struct {
	Url    string `json:"url"`
	Secret string `json:"secret"`

	MaxStreamBitrate int `json:"maxstreambitrate,omitempty"`
	MaxScreenBitrate int `json:"maxscreenbitrate,omitempty"`

	SessionLimit uint64 `json:"sessionlimit,omitempty"`
	// contains filtered or unexported fields
}

func (*BackendInformationEtcd) CheckValid added in v1.0.0

func (p *BackendInformationEtcd) CheckValid() error

type BackendPingEntry

type BackendPingEntry struct {
	UserId    string `json:"userid,omitempty"`
	SessionId string `json:"sessionid"`
}

type BackendResponseWithStatus added in v1.2.0

type BackendResponseWithStatus interface {
	Status() int
}

type BackendRoomDeleteRequest

type BackendRoomDeleteRequest struct {
	UserIds []string `json:"userids,omitempty"`
}

type BackendRoomDialoutError added in v1.2.0

type BackendRoomDialoutError struct {
	Code    string `json:"code"`
	Message string `json:"message,omitempty"`
}

type BackendRoomDialoutRequest added in v1.2.0

type BackendRoomDialoutRequest struct {
	// E.164 number to dial (e.g. "+1234567890")
	Number string `json:"number"`

	Options json.RawMessage `json:"options,omitempty"`
}

func (*BackendRoomDialoutRequest) ValidateNumber added in v1.2.0

func (r *BackendRoomDialoutRequest) ValidateNumber() *Error

type BackendRoomDialoutResponse added in v1.2.0

type BackendRoomDialoutResponse struct {
	CallId string `json:"callid,omitempty"`

	Error *Error `json:"error,omitempty"`
}

type BackendRoomDisinviteRequest

type BackendRoomDisinviteRequest struct {
	UserIds    []string `json:"userids,omitempty"`
	SessionIds []string `json:"sessionids,omitempty"`
	// TODO(jojo): We should get rid of "AllUserIds" and find a better way to
	// notify existing users the room has changed and they need to update it.
	AllUserIds []string         `json:"alluserids,omitempty"`
	Properties *json.RawMessage `json:"properties,omitempty"`
}

type BackendRoomInCallRequest

type BackendRoomInCallRequest struct {
	// TODO(jojo): Change "InCall" to "int" when #914 has landed in NC Talk.
	InCall  json.RawMessage          `json:"incall,omitempty"`
	All     bool                     `json:"all,omitempty"`
	Changed []map[string]interface{} `json:"changed,omitempty"`
	Users   []map[string]interface{} `json:"users,omitempty"`
}

type BackendRoomInviteRequest

type BackendRoomInviteRequest struct {
	UserIds []string `json:"userids,omitempty"`
	// TODO(jojo): We should get rid of "AllUserIds" and find a better way to
	// notify existing users the room has changed and they need to update it.
	AllUserIds []string         `json:"alluserids,omitempty"`
	Properties *json.RawMessage `json:"properties,omitempty"`
}

type BackendRoomMessageRequest

type BackendRoomMessageRequest struct {
	Data *json.RawMessage `json:"data,omitempty"`
}

type BackendRoomParticipantsRequest

type BackendRoomParticipantsRequest struct {
	Changed []map[string]interface{} `json:"changed,omitempty"`
	Users   []map[string]interface{} `json:"users,omitempty"`
}

type BackendRoomSwitchToMessageRequest added in v1.1.0

type BackendRoomSwitchToMessageRequest struct {
	// Target room id
	RoomId string `json:"roomid"`

	// Sessions is either a BackendRoomSwitchToSessionsList or a
	// BackendRoomSwitchToSessionsMap.
	// In the map, the key is the session id, the value additional details
	// (or null) for the session. The details will be included in the request
	// to the connected client.
	Sessions *json.RawMessage `json:"sessions,omitempty"`

	// Internal properties
	SessionsList BackendRoomSwitchToSessionsList `json:"sessionslist,omitempty"`
	SessionsMap  BackendRoomSwitchToSessionsMap  `json:"sessionsmap,omitempty"`
}

type BackendRoomSwitchToSessionsList added in v1.1.0

type BackendRoomSwitchToSessionsList []string

type BackendRoomSwitchToSessionsMap added in v1.1.0

type BackendRoomSwitchToSessionsMap map[string]json.RawMessage

type BackendRoomTransientRequest added in v1.2.0

type BackendRoomTransientRequest struct {
	Action TransientAction `json:"action"`
	Key    string          `json:"key"`
	Value  interface{}     `json:"value,omitempty"`
	TTL    time.Duration   `json:"ttl,omitempty"`
}

type BackendRoomUpdateRequest

type BackendRoomUpdateRequest struct {
	UserIds    []string         `json:"userids,omitempty"`
	Properties *json.RawMessage `json:"properties,omitempty"`
}

type BackendServer

type BackendServer struct {
	// contains filtered or unexported fields
}

func NewBackendServer

func NewBackendServer(config *goconf.ConfigFile, hub *Hub, version string) (*BackendServer, error)

func (*BackendServer) Start

func (b *BackendServer) Start(r *mux.Router) error

type BackendServerRoomRequest

type BackendServerRoomRequest struct {
	Type string `json:"type"`

	Invite *BackendRoomInviteRequest `json:"invite,omitempty"`

	Disinvite *BackendRoomDisinviteRequest `json:"disinvite,omitempty"`

	Update *BackendRoomUpdateRequest `json:"update,omitempty"`

	Delete *BackendRoomDeleteRequest `json:"delete,omitempty"`

	InCall *BackendRoomInCallRequest `json:"incall,omitempty"`

	Participants *BackendRoomParticipantsRequest `json:"participants,omitempty"`

	Message *BackendRoomMessageRequest `json:"message,omitempty"`

	SwitchTo *BackendRoomSwitchToMessageRequest `json:"switchto,omitempty"`

	Dialout *BackendRoomDialoutRequest `json:"dialout,omitempty"`

	Transient *BackendRoomTransientRequest `json:"transient,omitempty"`

	// Internal properties
	ReceivedTime int64 `json:"received,omitempty"`
	// contains filtered or unexported fields
}

type BackendServerRoomResponse added in v1.2.0

type BackendServerRoomResponse struct {
	Type string `json:"type"`

	Dialout *BackendRoomDialoutResponse `json:"dialout,omitempty"`
}

type BackendStorage added in v1.0.0

type BackendStorage interface {
	Close()
	Reload(config *goconf.ConfigFile)

	GetCompatBackend() *Backend
	GetBackend(u *url.URL) *Backend
	GetBackends() []*Backend
}

func NewBackendStorageEtcd added in v1.0.0

func NewBackendStorageEtcd(config *goconf.ConfigFile, etcdClient *EtcdClient) (BackendStorage, error)

func NewBackendStorageStatic added in v1.0.0

func NewBackendStorageStatic(config *goconf.ConfigFile) (BackendStorage, error)

type Backoff added in v1.0.0

type Backoff interface {
	Reset()
	NextWait() time.Duration
	Wait(context.Context)
}

func NewExponentialBackoff added in v1.0.0

func NewExponentialBackoff(initial time.Duration, maxWait time.Duration) (Backoff, error)

type BuiltinRoomSessions

type BuiltinRoomSessions struct {
	// contains filtered or unexported fields
}

func (*BuiltinRoomSessions) DeleteRoomSession

func (r *BuiltinRoomSessions) DeleteRoomSession(session Session)

func (*BuiltinRoomSessions) GetSessionId

func (r *BuiltinRoomSessions) GetSessionId(roomSessionId string) (string, error)

func (*BuiltinRoomSessions) LookupSessionId added in v1.0.0

func (r *BuiltinRoomSessions) LookupSessionId(ctx context.Context, roomSessionId string, disconnectReason string) (string, error)

func (*BuiltinRoomSessions) SetRoomSession

func (r *BuiltinRoomSessions) SetRoomSession(session Session, roomSessionId string) error

type ByeClientMessage

type ByeClientMessage struct {
}

func (*ByeClientMessage) CheckValid

func (m *ByeClientMessage) CheckValid() error

type ByeProxyClientMessage

type ByeProxyClientMessage struct {
}

func (*ByeProxyClientMessage) CheckValid

func (m *ByeProxyClientMessage) CheckValid() error

type ByeProxyServerMessage

type ByeProxyServerMessage struct {
	Reason string `json:"reason"`
}

type ByeServerMessage

type ByeServerMessage struct {
	Reason string `json:"reason"`
}

type Capabilities added in v0.5.0

type Capabilities struct {
	// contains filtered or unexported fields
}

func NewCapabilities added in v0.5.0

func NewCapabilities(version string, pool *HttpClientPool) (*Capabilities, error)

func (*Capabilities) GetIntegerConfig added in v0.5.0

func (c *Capabilities) GetIntegerConfig(ctx context.Context, u *url.URL, group, key string) (int, bool, bool)

func (*Capabilities) GetStringConfig added in v0.5.0

func (c *Capabilities) GetStringConfig(ctx context.Context, u *url.URL, group, key string) (string, bool, bool)

func (*Capabilities) HasCapabilityFeature added in v0.5.0

func (c *Capabilities) HasCapabilityFeature(ctx context.Context, u *url.URL, feature string) bool

func (*Capabilities) InvalidateCapabilities added in v1.0.0

func (c *Capabilities) InvalidateCapabilities(u *url.URL)

type CapabilitiesResponse

type CapabilitiesResponse struct {
	Version      CapabilitiesVersion         `json:"version"`
	Capabilities map[string]*json.RawMessage `json:"capabilities"`
}

type CapabilitiesVersion

type CapabilitiesVersion struct {
	Major           int    `json:"major"`
	Minor           int    `json:"minor"`
	Micro           int    `json:"micro"`
	String          string `json:"string"`
	Edition         string `json:"edition"`
	ExtendedSupport bool   `json:"extendedSupport"`
}

type CertPoolReloader added in v1.0.0

type CertPoolReloader struct {
	// contains filtered or unexported fields
}

func NewCertPoolReloader added in v1.0.0

func NewCertPoolReloader(certFile string) (*CertPoolReloader, error)

func (*CertPoolReloader) GetCertPool added in v1.0.0

func (r *CertPoolReloader) GetCertPool() *x509.CertPool

func (*CertPoolReloader) GetReloadCounter added in v1.2.4

func (r *CertPoolReloader) GetReloadCounter() uint64

type CertificateReloader added in v1.0.0

type CertificateReloader struct {
	// contains filtered or unexported fields
}

func NewCertificateReloader added in v1.0.0

func NewCertificateReloader(certFile string, keyFile string) (*CertificateReloader, error)

func (*CertificateReloader) GetCertificate added in v1.0.0

func (r *CertificateReloader) GetCertificate(h *tls.ClientHelloInfo) (*tls.Certificate, error)

func (*CertificateReloader) GetClientCertificate added in v1.0.0

func (r *CertificateReloader) GetClientCertificate(i *tls.CertificateRequestInfo) (*tls.Certificate, error)

func (*CertificateReloader) GetReloadCounter added in v1.2.4

func (r *CertificateReloader) GetReloadCounter() uint64

type ChannelWaiters added in v1.1.0

type ChannelWaiters struct {
	// contains filtered or unexported fields
}

func (*ChannelWaiters) Add added in v1.1.0

func (w *ChannelWaiters) Add(ch chan struct{}) uint64

func (*ChannelWaiters) Remove added in v1.1.0

func (w *ChannelWaiters) Remove(id uint64)

func (*ChannelWaiters) Wakeup added in v1.1.0

func (w *ChannelWaiters) Wakeup()

type ChatComment added in v0.5.0

type ChatComment map[string]interface{}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(conn *websocket.Conn, remoteAddress string, agent string, handler ClientHandler) (*Client, error)

func (*Client) Close

func (c *Client) Close()

func (*Client) Country

func (c *Client) Country() string

func (*Client) GetSession

func (c *Client) GetSession() *ClientSession

func (*Client) IsAuthenticated

func (c *Client) IsAuthenticated() bool

func (*Client) IsConnected

func (c *Client) IsConnected() bool

func (*Client) ReadPump

func (c *Client) ReadPump()

func (*Client) RemoteAddr

func (c *Client) RemoteAddr() string

func (*Client) SendByeResponse

func (c *Client) SendByeResponse(message *ClientMessage) bool

func (*Client) SendByeResponseWithReason

func (c *Client) SendByeResponseWithReason(message *ClientMessage, reason string) bool

func (*Client) SendError

func (c *Client) SendError(e *Error) bool

func (*Client) SendMessage

func (c *Client) SendMessage(message WritableClientMessage) bool

func (*Client) SetConn

func (c *Client) SetConn(conn *websocket.Conn, remoteAddress string, handler ClientHandler)

func (*Client) SetSession

func (c *Client) SetSession(session *ClientSession)

func (*Client) UserAgent

func (c *Client) UserAgent() string

func (*Client) WritePump

func (c *Client) WritePump()

type ClientGeoIpHandler added in v1.1.0

type ClientGeoIpHandler interface {
	OnLookupCountry(*Client) string
}

type ClientHandler added in v1.1.0

type ClientHandler interface {
	OnClosed(*Client)
	OnMessageReceived(*Client, []byte)
	OnRTTReceived(*Client, time.Duration)
}

type ClientMessage

type ClientMessage struct {
	json.Marshaler
	json.Unmarshaler

	// The unique request id (optional).
	Id string `json:"id,omitempty"`

	// The type of the request.
	Type string `json:"type"`

	// Filled for type "hello"
	Hello *HelloClientMessage `json:"hello,omitempty"`

	Bye *ByeClientMessage `json:"bye,omitempty"`

	Room *RoomClientMessage `json:"room,omitempty"`

	Message *MessageClientMessage `json:"message,omitempty"`

	Control *ControlClientMessage `json:"control,omitempty"`

	Internal *InternalClientMessage `json:"internal,omitempty"`

	TransientData *TransientDataClientMessage `json:"transient,omitempty"`
}

ClientMessage is a message that is sent from a client to the server.

func (*ClientMessage) CheckValid

func (m *ClientMessage) CheckValid() error

func (*ClientMessage) NewErrorServerMessage

func (m *ClientMessage) NewErrorServerMessage(e *Error) *ServerMessage

func (*ClientMessage) NewWrappedErrorServerMessage

func (m *ClientMessage) NewWrappedErrorServerMessage(e error) *ServerMessage

func (*ClientMessage) String

func (m *ClientMessage) String() string

type ClientSession

type ClientSession struct {
	// contains filtered or unexported fields
}

func NewClientSession

func NewClientSession(hub *Hub, privateId string, publicId string, data *SessionIdData, backend *Backend, hello *HelloClientMessage, auth *BackendClientAuthResponse) (*ClientSession, error)

func (*ClientSession) AddVirtualSession

func (s *ClientSession) AddVirtualSession(session *VirtualSession)

func (*ClientSession) AuthUserId

func (s *ClientSession) AuthUserId() string

func (*ClientSession) Backend

func (s *ClientSession) Backend() *Backend

func (*ClientSession) BackendUrl

func (s *ClientSession) BackendUrl() string

func (*ClientSession) CheckOfferType added in v0.4.0

func (s *ClientSession) CheckOfferType(streamType StreamType, data *MessageClientMessageData) (MediaType, error)

func (*ClientSession) ClearClient

func (s *ClientSession) ClearClient(client *Client)

func (*ClientSession) ClearResponseHandler added in v1.2.0

func (s *ClientSession) ClearResponseHandler(id string)

func (*ClientSession) ClientType

func (s *ClientSession) ClientType() string

func (*ClientSession) Close

func (s *ClientSession) Close()

func (*ClientSession) Data

func (s *ClientSession) Data() *SessionIdData

func (*ClientSession) GetClient

func (s *ClientSession) GetClient() *Client

func (*ClientSession) GetFeatures

func (s *ClientSession) GetFeatures() []string

func (*ClientSession) GetInCall added in v1.1.0

func (s *ClientSession) GetInCall() int

GetInCall is only used for internal clients.

func (*ClientSession) GetOrCreatePublisher

func (s *ClientSession) GetOrCreatePublisher(ctx context.Context, mcu Mcu, streamType StreamType, data *MessageClientMessageData) (McuPublisher, error)

func (*ClientSession) GetOrCreateSubscriber

func (s *ClientSession) GetOrCreateSubscriber(ctx context.Context, mcu Mcu, id string, streamType StreamType) (McuSubscriber, error)

func (*ClientSession) GetOrWaitForPublisher added in v1.0.0

func (s *ClientSession) GetOrWaitForPublisher(ctx context.Context, streamType StreamType) McuPublisher

func (*ClientSession) GetPublisher

func (s *ClientSession) GetPublisher(streamType StreamType) McuPublisher

func (*ClientSession) GetRoom

func (s *ClientSession) GetRoom() *Room

func (*ClientSession) GetSubscriber

func (s *ClientSession) GetSubscriber(id string, streamType StreamType) McuSubscriber

func (*ClientSession) GetVirtualSessions added in v1.0.0

func (s *ClientSession) GetVirtualSessions() []*VirtualSession

func (*ClientSession) HandleResponse added in v1.2.0

func (s *ClientSession) HandleResponse(id string, handler ResponseHandlerFunc)

func (*ClientSession) HasAnyPermission added in v0.4.0

func (s *ClientSession) HasAnyPermission(permission ...Permission) bool

HasAnyPermission checks if the session has one of the passed permissions.

func (*ClientSession) HasFeature

func (s *ClientSession) HasFeature(feature string) bool

func (*ClientSession) HasPermission

func (s *ClientSession) HasPermission(permission Permission) bool

HasPermission checks if the session has the passed permissions.

func (*ClientSession) IsAllowedToSend added in v0.4.0

func (s *ClientSession) IsAllowedToSend(data *MessageClientMessageData) error

func (*ClientSession) IsExpired

func (s *ClientSession) IsExpired(now time.Time) bool

func (*ClientSession) LeaveCall

func (s *ClientSession) LeaveCall()

func (*ClientSession) LeaveRoom

func (s *ClientSession) LeaveRoom(notify bool) *Room

func (*ClientSession) NotifySessionResumed

func (s *ClientSession) NotifySessionResumed(client *Client)

func (*ClientSession) OnIceCandidate

func (s *ClientSession) OnIceCandidate(client McuClient, candidate interface{})

func (*ClientSession) OnIceCompleted

func (s *ClientSession) OnIceCompleted(client McuClient)

func (*ClientSession) OnUpdateOffer added in v0.5.0

func (s *ClientSession) OnUpdateOffer(client McuClient, offer map[string]interface{})

func (*ClientSession) ParsedBackendUrl

func (s *ClientSession) ParsedBackendUrl() *url.URL

func (*ClientSession) PrivateId

func (s *ClientSession) PrivateId() string

func (*ClientSession) ProcessAsyncRoomMessage added in v1.0.0

func (s *ClientSession) ProcessAsyncRoomMessage(message *AsyncMessage)

func (*ClientSession) ProcessAsyncSessionMessage added in v1.0.0

func (s *ClientSession) ProcessAsyncSessionMessage(message *AsyncMessage)

func (*ClientSession) ProcessAsyncUserMessage added in v1.0.0

func (s *ClientSession) ProcessAsyncUserMessage(message *AsyncMessage)

func (*ClientSession) ProcessResponse added in v1.2.0

func (s *ClientSession) ProcessResponse(message *ClientMessage) bool

func (*ClientSession) PublicId

func (s *ClientSession) PublicId() string

func (*ClientSession) PublisherClosed

func (s *ClientSession) PublisherClosed(publisher McuPublisher)

func (*ClientSession) RemoveVirtualSession

func (s *ClientSession) RemoveVirtualSession(session *VirtualSession)

func (*ClientSession) RoomSessionId

func (s *ClientSession) RoomSessionId() string

func (*ClientSession) SendError

func (s *ClientSession) SendError(e *Error) bool

func (*ClientSession) SendMessage

func (s *ClientSession) SendMessage(message *ServerMessage) bool

func (*ClientSession) SendMessages

func (s *ClientSession) SendMessages(messages []*ServerMessage) bool

func (*ClientSession) SetClient

func (s *ClientSession) SetClient(client *Client) *Client

func (*ClientSession) SetInCall added in v1.1.0

func (s *ClientSession) SetInCall(inCall int) bool

func (*ClientSession) SetPermissions

func (s *ClientSession) SetPermissions(permissions []Permission)

func (*ClientSession) SetRoom

func (s *ClientSession) SetRoom(room *Room)

func (*ClientSession) StartExpire

func (s *ClientSession) StartExpire()

func (*ClientSession) StopExpire

func (s *ClientSession) StopExpire()

func (*ClientSession) SubscribeEvents added in v1.0.0

func (s *ClientSession) SubscribeEvents() error

func (*ClientSession) SubscribeRoomEvents added in v1.0.0

func (s *ClientSession) SubscribeRoomEvents(roomid string, roomSessionId string) error

func (*ClientSession) SubscriberClosed

func (s *ClientSession) SubscriberClosed(subscriber McuSubscriber)

func (*ClientSession) SubscriberSidUpdated added in v0.5.0

func (s *ClientSession) SubscriberSidUpdated(subscriber McuSubscriber)

func (*ClientSession) UnsubscribeRoomEvents added in v1.0.0

func (s *ClientSession) UnsubscribeRoomEvents()

func (*ClientSession) UpdateRoomSessionId added in v1.2.0

func (s *ClientSession) UpdateRoomSessionId(roomSessionId string) error

func (*ClientSession) UserData

func (s *ClientSession) UserData() *json.RawMessage

func (*ClientSession) UserId

func (s *ClientSession) UserId() string

type ClientTypeInternalAuthParams

type ClientTypeInternalAuthParams struct {
	Random string `json:"random"`
	Token  string `json:"token"`

	Backend string `json:"backend"`
	// contains filtered or unexported fields
}

func (*ClientTypeInternalAuthParams) CheckValid

func (p *ClientTypeInternalAuthParams) CheckValid() error

type Closer added in v1.1.0

type Closer struct {
	C chan struct{}
	// contains filtered or unexported fields
}

func NewCloser added in v1.1.0

func NewCloser() *Closer

func (*Closer) Close added in v1.1.0

func (c *Closer) Close()

func (*Closer) IsClosed added in v1.1.0

func (c *Closer) IsClosed() bool

type CommandProxyClientMessage

type CommandProxyClientMessage struct {
	Type string `json:"type"`

	Sid         string     `json:"sid,omitempty"`
	StreamType  StreamType `json:"streamType,omitempty"`
	PublisherId string     `json:"publisherId,omitempty"`
	ClientId    string     `json:"clientId,omitempty"`
	Bitrate     int        `json:"bitrate,omitempty"`
	MediaTypes  MediaType  `json:"mediatypes,omitempty"`
}

func (*CommandProxyClientMessage) CheckValid

func (m *CommandProxyClientMessage) CheckValid() error

type CommandProxyServerMessage

type CommandProxyServerMessage struct {
	Id  string `json:"id,omitempty"`
	Sid string `json:"sid,omitempty"`

	Bitrate int `json:"bitrate,omitempty"`
}

type CommonSessionInternalClientMessage

type CommonSessionInternalClientMessage struct {
	SessionId string `json:"sessionid"`

	RoomId string `json:"roomid"`
}

func (*CommonSessionInternalClientMessage) CheckValid

func (m *CommonSessionInternalClientMessage) CheckValid() error

type ConcurrentStringStringMap

type ConcurrentStringStringMap struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*ConcurrentStringStringMap) Clear

func (m *ConcurrentStringStringMap) Clear()

func (*ConcurrentStringStringMap) Del

func (m *ConcurrentStringStringMap) Del(key string)

func (*ConcurrentStringStringMap) Get

func (*ConcurrentStringStringMap) Len

func (m *ConcurrentStringStringMap) Len() int

func (*ConcurrentStringStringMap) Set

func (m *ConcurrentStringStringMap) Set(key, value string)

type ControlClientMessage

type ControlClientMessage struct {
	MessageClientMessage
}

func (*ControlClientMessage) CheckValid

func (m *ControlClientMessage) CheckValid() error

type ControlServerMessage

type ControlServerMessage struct {
	Sender    *MessageServerMessageSender    `json:"sender"`
	Recipient *MessageClientMessageRecipient `json:"recipient,omitempty"`

	Data *json.RawMessage `json:"data"`
}

type DeferredExecutor

type DeferredExecutor struct {
	// contains filtered or unexported fields
}

DeferredExecutor will asynchronously execute functions while maintaining their order.

func NewDeferredExecutor

func NewDeferredExecutor(queueSize int) *DeferredExecutor

func (*DeferredExecutor) Close

func (e *DeferredExecutor) Close()

func (*DeferredExecutor) Execute

func (e *DeferredExecutor) Execute(f func())

type DialoutErrorResponse added in v1.2.0

type DialoutErrorResponse struct {
	BackendServerRoomResponse
	// contains filtered or unexported fields
}

func (*DialoutErrorResponse) Status added in v1.2.0

func (r *DialoutErrorResponse) Status() int

type DialoutInternalClientMessage added in v1.2.0

type DialoutInternalClientMessage struct {
	Type string `json:"type"`

	RoomId string `json:"roomid,omitempty"`

	Error *Error `json:"error,omitempty"`

	Status *DialoutStatusInternalClientMessage `json:"status,omitempty"`
}

func (*DialoutInternalClientMessage) CheckValid added in v1.2.0

func (m *DialoutInternalClientMessage) CheckValid() error

type DialoutStatus added in v1.2.0

type DialoutStatus string
var (
	DialoutStatusAccepted  DialoutStatus = "accepted"
	DialoutStatusRinging   DialoutStatus = "ringing"
	DialoutStatusConnected DialoutStatus = "connected"
	DialoutStatusRejected  DialoutStatus = "rejected"
	DialoutStatusCleared   DialoutStatus = "cleared"
)

type DialoutStatusInternalClientMessage added in v1.2.0

type DialoutStatusInternalClientMessage struct {
	CallId string        `json:"callid"`
	Status DialoutStatus `json:"status"`

	// Cause is set if Status is "cleared" or "rejected".
	Cause   string `json:"cause,omitempty"`
	Code    int    `json:"code,omitempty"`
	Message string `json:"message,omitempty"`
}

type DnsMonitor added in v1.2.3

type DnsMonitor struct {
	// contains filtered or unexported fields
}

func NewDnsMonitor added in v1.2.3

func NewDnsMonitor(interval time.Duration) (*DnsMonitor, error)

func (*DnsMonitor) Add added in v1.2.3

func (m *DnsMonitor) Add(target string, callback DnsMonitorCallback) (*DnsMonitorEntry, error)

func (*DnsMonitor) Remove added in v1.2.3

func (m *DnsMonitor) Remove(entry *DnsMonitorEntry)

func (*DnsMonitor) Start added in v1.2.3

func (m *DnsMonitor) Start() error

func (*DnsMonitor) Stop added in v1.2.3

func (m *DnsMonitor) Stop()

type DnsMonitorCallback added in v1.2.3

type DnsMonitorCallback = func(entry *DnsMonitorEntry, all []net.IP, add []net.IP, keep []net.IP, remove []net.IP)

type DnsMonitorEntry added in v1.2.3

type DnsMonitorEntry struct {
	// contains filtered or unexported fields
}

func (*DnsMonitorEntry) URL added in v1.2.3

func (e *DnsMonitorEntry) URL() string

type Error

type Error struct {
	Code    string          `json:"code"`
	Message string          `json:"message"`
	Details json.RawMessage `json:"details,omitempty"`
}

func NewError

func NewError(code string, message string) *Error

func NewErrorDetail

func NewErrorDetail(code string, message string, details interface{}) *Error

func (*Error) Error

func (e *Error) Error() string

type EtcdClient added in v1.0.0

type EtcdClient struct {
	// contains filtered or unexported fields
}

func NewEtcdClient added in v1.0.0

func NewEtcdClient(config *goconf.ConfigFile, compatSection string) (*EtcdClient, error)

func (*EtcdClient) AddListener added in v1.0.0

func (c *EtcdClient) AddListener(listener EtcdClientListener)

func (*EtcdClient) Close added in v1.0.0

func (c *EtcdClient) Close() error

func (*EtcdClient) Get added in v1.0.0

func (c *EtcdClient) Get(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error)

func (*EtcdClient) IsConfigured added in v1.0.0

func (c *EtcdClient) IsConfigured() bool

func (*EtcdClient) RemoveListener added in v1.0.0

func (c *EtcdClient) RemoveListener(listener EtcdClientListener)

func (*EtcdClient) WaitForConnection added in v1.0.0

func (c *EtcdClient) WaitForConnection(ctx context.Context) error

func (*EtcdClient) Watch added in v1.0.0

func (c *EtcdClient) Watch(ctx context.Context, key string, watcher EtcdClientWatcher, opts ...clientv3.OpOption) error

type EtcdClientListener added in v1.0.0

type EtcdClientListener interface {
	EtcdClientCreated(client *EtcdClient)
}

type EtcdClientWatcher added in v1.0.0

type EtcdClientWatcher interface {
	EtcdWatchCreated(client *EtcdClient, key string)
	EtcdKeyUpdated(client *EtcdClient, key string, value []byte)
	EtcdKeyDeleted(client *EtcdClient, key string)
}

type EventProxyServerMessage

type EventProxyServerMessage struct {
	Type string `json:"type"`

	ClientId string `json:"clientId,omitempty"`
	Load     int64  `json:"load,omitempty"`
	Sid      string `json:"sid,omitempty"`
}

type EventServerMessage

type EventServerMessage struct {
	Target string `json:"target"`
	Type   string `json:"type"`

	// Used for target "room"
	Join     []*EventServerMessageSessionEntry `json:"join,omitempty"`
	Leave    []string                          `json:"leave,omitempty"`
	Change   []*EventServerMessageSessionEntry `json:"change,omitempty"`
	SwitchTo *EventServerMessageSwitchTo       `json:"switchto,omitempty"`

	// Used for target "roomlist" / "participants"
	Invite    *RoomEventServerMessage          `json:"invite,omitempty"`
	Disinvite *RoomDisinviteEventServerMessage `json:"disinvite,omitempty"`
	Update    *RoomEventServerMessage          `json:"update,omitempty"`
	Flags     *RoomFlagsServerMessage          `json:"flags,omitempty"`

	// Used for target "message"
	Message *RoomEventMessage `json:"message,omitempty"`
}

func (*EventServerMessage) String added in v1.0.0

func (m *EventServerMessage) String() string

type EventServerMessageSessionEntry

type EventServerMessageSessionEntry struct {
	SessionId     string           `json:"sessionid"`
	UserId        string           `json:"userid"`
	User          *json.RawMessage `json:"user,omitempty"`
	RoomSessionId string           `json:"roomsessionid,omitempty"`
}

func (*EventServerMessageSessionEntry) Clone added in v0.5.0

type EventServerMessageSwitchTo added in v1.1.0

type EventServerMessageSwitchTo struct {
	RoomId  string          `json:"roomid"`
	Details json.RawMessage `json:"details,omitempty"`
}

type FileWatcher added in v1.2.4

type FileWatcher struct {
	// contains filtered or unexported fields
}

func NewFileWatcher added in v1.2.4

func NewFileWatcher(filename string, callback FileWatcherCallback) (*FileWatcher, error)

func (*FileWatcher) Close added in v1.2.4

func (f *FileWatcher) Close() error

type FileWatcherCallback added in v1.2.4

type FileWatcherCallback func(filename string)

type Flags added in v1.2.0

type Flags struct {
	// contains filtered or unexported fields
}

func (*Flags) Add added in v1.2.0

func (f *Flags) Add(flags uint32) bool

func (*Flags) Get added in v1.2.0

func (f *Flags) Get() uint32

func (*Flags) Remove added in v1.2.0

func (f *Flags) Remove(flags uint32) bool

func (*Flags) Set added in v1.2.0

func (f *Flags) Set(flags uint32) bool

type GatewayListener

type GatewayListener interface {
	ConnectionInterrupted()
}

type GeoLookup

type GeoLookup struct {
	// contains filtered or unexported fields
}

func NewGeoLookupFromFile

func NewGeoLookupFromFile(filename string) (*GeoLookup, error)

func NewGeoLookupFromUrl

func NewGeoLookupFromUrl(url string) (*GeoLookup, error)

func (*GeoLookup) Close

func (g *GeoLookup) Close()

func (*GeoLookup) LookupCountry

func (g *GeoLookup) LookupCountry(ip net.IP) (string, error)

func (*GeoLookup) Update

func (g *GeoLookup) Update() error

type GrpcClient added in v1.0.0

type GrpcClient struct {
	// contains filtered or unexported fields
}

func NewGrpcClient added in v1.0.0

func NewGrpcClient(target string, ip net.IP, opts ...grpc.DialOption) (*GrpcClient, error)

func (*GrpcClient) Close added in v1.0.0

func (c *GrpcClient) Close() error

func (*GrpcClient) GetPublisherId added in v1.0.0

func (c *GrpcClient) GetPublisherId(ctx context.Context, sessionId string, streamType StreamType) (string, string, net.IP, error)

func (*GrpcClient) GetServerId added in v1.0.0

func (c *GrpcClient) GetServerId(ctx context.Context) (string, error)

func (*GrpcClient) GetSessionCount added in v1.0.0

func (c *GrpcClient) GetSessionCount(ctx context.Context, u *url.URL) (uint32, error)

func (*GrpcClient) IsSelf added in v1.0.0

func (c *GrpcClient) IsSelf() bool

func (*GrpcClient) IsSessionInCall added in v1.0.0

func (c *GrpcClient) IsSessionInCall(ctx context.Context, sessionId string, room *Room) (bool, error)

func (*GrpcClient) LookupSessionId added in v1.0.0

func (c *GrpcClient) LookupSessionId(ctx context.Context, roomSessionId string, disconnectReason string) (string, error)

func (*GrpcClient) SetSelf added in v1.0.0

func (c *GrpcClient) SetSelf(self bool)

func (*GrpcClient) Target added in v1.0.0

func (c *GrpcClient) Target() string

type GrpcClients added in v1.0.0

type GrpcClients struct {
	// contains filtered or unexported fields
}

func NewGrpcClients added in v1.0.0

func NewGrpcClients(config *goconf.ConfigFile, etcdClient *EtcdClient, dnsMonitor *DnsMonitor) (*GrpcClients, error)

func (*GrpcClients) Close added in v1.0.0

func (c *GrpcClients) Close()

func (*GrpcClients) EtcdClientCreated added in v1.0.0

func (c *GrpcClients) EtcdClientCreated(client *EtcdClient)

func (*GrpcClients) EtcdKeyDeleted added in v1.0.0

func (c *GrpcClients) EtcdKeyDeleted(client *EtcdClient, key string)

func (*GrpcClients) EtcdKeyUpdated added in v1.0.0

func (c *GrpcClients) EtcdKeyUpdated(client *EtcdClient, key string, data []byte)

func (*GrpcClients) EtcdWatchCreated added in v1.0.0

func (c *GrpcClients) EtcdWatchCreated(client *EtcdClient, key string)

func (*GrpcClients) GetClients added in v1.0.0

func (c *GrpcClients) GetClients() []*GrpcClient

func (*GrpcClients) Reload added in v1.0.0

func (c *GrpcClients) Reload(config *goconf.ConfigFile)

func (*GrpcClients) WaitForInitialized added in v1.0.0

func (c *GrpcClients) WaitForInitialized(ctx context.Context) error

type GrpcServer added in v1.0.0

type GrpcServer struct {
	UnimplementedRpcBackendServer
	UnimplementedRpcInternalServer
	UnimplementedRpcMcuServer
	UnimplementedRpcSessionsServer
	// contains filtered or unexported fields
}

func NewGrpcServer added in v1.0.0

func NewGrpcServer(config *goconf.ConfigFile) (*GrpcServer, error)

func (*GrpcServer) Close added in v1.0.0

func (s *GrpcServer) Close()

func (*GrpcServer) GetPublisherId added in v1.0.0

func (s *GrpcServer) GetPublisherId(ctx context.Context, request *GetPublisherIdRequest) (*GetPublisherIdReply, error)

func (*GrpcServer) GetServerId added in v1.0.0

func (s *GrpcServer) GetServerId(ctx context.Context, request *GetServerIdRequest) (*GetServerIdReply, error)

func (*GrpcServer) GetSessionCount added in v1.0.0

func (s *GrpcServer) GetSessionCount(ctx context.Context, request *GetSessionCountRequest) (*GetSessionCountReply, error)

func (*GrpcServer) IsSessionInCall added in v1.0.0

func (s *GrpcServer) IsSessionInCall(ctx context.Context, request *IsSessionInCallRequest) (*IsSessionInCallReply, error)

func (*GrpcServer) LookupSessionId added in v1.0.0

func (s *GrpcServer) LookupSessionId(ctx context.Context, request *LookupSessionIdRequest) (*LookupSessionIdReply, error)

func (*GrpcServer) Run added in v1.0.0

func (s *GrpcServer) Run() error

type GrpcTargetInformationEtcd added in v1.0.0

type GrpcTargetInformationEtcd struct {
	Address string `json:"address"`
}

func (*GrpcTargetInformationEtcd) CheckValid added in v1.0.0

func (p *GrpcTargetInformationEtcd) CheckValid() error

type HelloClientMessage

type HelloClientMessage struct {
	Version string `json:"version"`

	ResumeId string `json:"resumeid"`

	Features []string `json:"features,omitempty"`

	// The authentication credentials.
	Auth HelloClientMessageAuth `json:"auth"`
}

func (*HelloClientMessage) CheckValid

func (m *HelloClientMessage) CheckValid() error

type HelloClientMessageAuth

type HelloClientMessageAuth struct {
	// The client type that is connecting. Leave empty to use the default
	// "HelloClientTypeClient"
	Type string `json:"type,omitempty"`

	Params *json.RawMessage `json:"params"`

	Url string `json:"url"`
	// contains filtered or unexported fields
}

type HelloProxyClientMessage

type HelloProxyClientMessage struct {
	Version string `json:"version"`

	ResumeId string `json:"resumeid"`

	Features []string `json:"features,omitempty"`

	// The authentication credentials.
	Token string `json:"token"`
}

func (*HelloProxyClientMessage) CheckValid

func (m *HelloProxyClientMessage) CheckValid() error

type HelloProxyServerMessage

type HelloProxyServerMessage struct {
	Version string `json:"version"`

	SessionId string                `json:"sessionid"`
	Server    *WelcomeServerMessage `json:"server,omitempty"`
}

type HelloServerMessage

type HelloServerMessage struct {
	Version string `json:"version"`

	SessionId string `json:"sessionid"`
	ResumeId  string `json:"resumeid"`
	UserId    string `json:"userid"`

	// TODO: Remove once all clients have switched to the "welcome" message.
	Server *WelcomeServerMessage `json:"server,omitempty"`
}

type HelloV2AuthParams added in v1.0.0

type HelloV2AuthParams struct {
	Token string `json:"token"`
}

func (*HelloV2AuthParams) CheckValid added in v1.0.0

func (p *HelloV2AuthParams) CheckValid() error

type HelloV2TokenClaims added in v1.0.0

type HelloV2TokenClaims struct {
	jwt.RegisteredClaims

	UserData *json.RawMessage `json:"userdata,omitempty"`
}

type HttpClientPool

type HttpClientPool struct {
	// contains filtered or unexported fields
}

func NewHttpClientPool

func NewHttpClientPool(maxConcurrentRequestsPerHost int, skipVerify bool) (*HttpClientPool, error)

func (*HttpClientPool) Get

func (p *HttpClientPool) Get(ctx context.Context, url *url.URL) (*http.Client, *Pool, error)

type Hub

type Hub struct {
	// contains filtered or unexported fields
}

func NewHub

func NewHub(config *goconf.ConfigFile, events AsyncEvents, rpcServer *GrpcServer, rpcClients *GrpcClients, etcdClient *EtcdClient, r *mux.Router, version string) (*Hub, error)

func (*Hub) GetDialoutSession added in v1.2.1

func (h *Hub) GetDialoutSession(roomId string, backend *Backend) *ClientSession

func (*Hub) GetServerInfo

func (h *Hub) GetServerInfo(session Session) *WelcomeServerMessage

func (*Hub) GetSessionByPublicId

func (h *Hub) GetSessionByPublicId(sessionId string) Session

func (*Hub) GetStats

func (h *Hub) GetStats() map[string]interface{}

func (*Hub) OnClosed added in v1.1.0

func (h *Hub) OnClosed(client *Client)

func (*Hub) OnLookupCountry added in v1.1.0

func (h *Hub) OnLookupCountry(client *Client) string

func (*Hub) OnMessageReceived added in v1.1.0

func (h *Hub) OnMessageReceived(client *Client, data []byte)

func (*Hub) OnRTTReceived added in v1.1.0

func (h *Hub) OnRTTReceived(client *Client, rtt time.Duration)

func (*Hub) Reload

func (h *Hub) Reload(config *goconf.ConfigFile)

func (*Hub) Run

func (h *Hub) Run()

func (*Hub) SetMcu

func (h *Hub) SetMcu(mcu Mcu)

func (*Hub) Stop

func (h *Hub) Stop()

type InCallInternalClientMessage added in v1.1.0

type InCallInternalClientMessage struct {
	InCall int `json:"incall"`
}

func (*InCallInternalClientMessage) CheckValid added in v1.1.0

func (m *InCallInternalClientMessage) CheckValid() error

type InfoMsg

type InfoMsg struct {
	Name          string
	Version       int
	VersionString string `json:"version_string"`
	Author        string
	DataChannels  bool   `json:"data_channels"`
	IPv6          bool   `json:"ipv6"`
	LocalIP       string `json:"local-ip"`
	ICE_TCP       bool   `json:"ice-tcp"`
	FullTrickle   bool   `json:"full-trickle"`
	Transports    map[string]janus.PluginInfo
	Plugins       map[string]janus.PluginInfo
}

type InternalClientMessage

type InternalClientMessage struct {
	Type string `json:"type"`

	AddSession *AddSessionInternalClientMessage `json:"addsession,omitempty"`

	UpdateSession *UpdateSessionInternalClientMessage `json:"updatesession,omitempty"`

	RemoveSession *RemoveSessionInternalClientMessage `json:"removesession,omitempty"`

	InCall *InCallInternalClientMessage `json:"incall,omitempty"`

	Dialout *DialoutInternalClientMessage `json:"dialout,omitempty"`
}

func (*InternalClientMessage) CheckValid

func (m *InternalClientMessage) CheckValid() error

type InternalServerDialoutRequest added in v1.2.0

type InternalServerDialoutRequest struct {
	RoomId  string `json:"roomid"`
	Backend string `json:"backend"`

	Request *BackendRoomDialoutRequest `json:"request"`
}

type InternalServerMessage added in v1.2.0

type InternalServerMessage struct {
	Type string `json:"type"`

	Dialout *InternalServerDialoutRequest `json:"dialout,omitempty"`
}

type JanusGateway

type JanusGateway struct {

	// Sessions is a map of the currently active sessions to the gateway.
	Sessions map[uint64]*JanusSession

	// Access to the Sessions map should be synchronized with the Gateway.Lock()
	// and Gateway.Unlock() methods provided by the embedded sync.Mutex.
	sync.Mutex
	// contains filtered or unexported fields
}

Gateway represents a connection to an instance of the Janus Gateway.

func NewJanusGateway

func NewJanusGateway(wsURL string, listener GatewayListener) (*JanusGateway, error)

func (*JanusGateway) Close

func (gateway *JanusGateway) Close() error

Close closes the underlying connection to the Gateway.

func (*JanusGateway) Create

func (gateway *JanusGateway) Create(ctx context.Context) (*JanusSession, error)

Create sends a create request to the Gateway. On success, a new Session will be returned and error will be nil.

func (*JanusGateway) Info

func (gateway *JanusGateway) Info(ctx context.Context) (*InfoMsg, error)

Info sends an info request to the Gateway. On success, an InfoMsg will be returned and error will be nil.

type JanusHandle

type JanusHandle struct {
	// Id is the handle_id of this plugin handle
	Id uint64

	// Type   // pub  or sub
	Type string

	//User   // Userid
	User string

	// Events is a receive only channel that can be used to receive events
	// related to this handle from the gateway.
	Events chan interface{}
	// contains filtered or unexported fields
}

Handle represents a handle to a plugin instance on the Gateway.

func (*JanusHandle) Detach

func (handle *JanusHandle) Detach(ctx context.Context) (*janus.AckMsg, error)

Detach sends a detach request to the Gateway to remove this handle. On success, an AckMsg will be returned and error will be nil.

func (*JanusHandle) Message

func (handle *JanusHandle) Message(ctx context.Context, body, jsep interface{}) (*janus.EventMsg, error)

Message sends a message request to a plugin handle on the Gateway. body should be the plugin data to be passed to the plugin, and jsep should contain an optional SDP offer/answer to establish a WebRTC PeerConnection. On success, an EventMsg will be returned and error will be nil.

func (*JanusHandle) Request

func (handle *JanusHandle) Request(ctx context.Context, body interface{}) (*janus.SuccessMsg, error)

send sync request

func (*JanusHandle) Trickle

func (handle *JanusHandle) Trickle(ctx context.Context, candidate interface{}) (*janus.AckMsg, error)

Trickle sends a trickle request to the Gateway as part of establishing a new PeerConnection with a plugin. candidate should be a single ICE candidate, or a completed object to signify that all candidates have been sent:

{
	"completed": true
}

On success, an AckMsg will be returned and error will be nil.

func (*JanusHandle) TrickleMany

func (handle *JanusHandle) TrickleMany(ctx context.Context, candidates interface{}) (*janus.AckMsg, error)

TrickleMany sends a trickle request to the Gateway as part of establishing a new PeerConnection with a plugin. candidates should be an array of ICE candidates. On success, an AckMsg will be returned and error will be nil.

type JanusSession

type JanusSession struct {
	// Id is the session_id of this session
	Id uint64

	// Handles is a map of plugin handles within this session
	Handles map[uint64]*JanusHandle

	// Access to the Handles map should be synchronized with the Session.Lock()
	// and Session.Unlock() methods provided by the embedded sync.Mutex.
	sync.Mutex
	// contains filtered or unexported fields
}

Session represents a session instance on the Janus Gateway.

func (*JanusSession) Attach

func (session *JanusSession) Attach(ctx context.Context, plugin string) (*JanusHandle, error)

Attach sends an attach request to the Gateway within this session. plugin should be the unique string of the plugin to attach to. On success, a new Handle will be returned and error will be nil.

func (*JanusSession) Destroy

func (session *JanusSession) Destroy(ctx context.Context) (*janus.AckMsg, error)

Destroy sends a destroy request to the Gateway to tear down this session. On success, the Session will be removed from the Gateway.Sessions map, an AckMsg will be returned and error will be nil.

func (*JanusSession) KeepAlive

func (session *JanusSession) KeepAlive(ctx context.Context) (*janus.AckMsg, error)

KeepAlive sends a keep-alive request to the Gateway. On success, an AckMsg will be returned and error will be nil.

type LoopbackNatsClient

type LoopbackNatsClient struct {
	// contains filtered or unexported fields
}

func (*LoopbackNatsClient) Close

func (c *LoopbackNatsClient) Close()

func (*LoopbackNatsClient) Decode

func (c *LoopbackNatsClient) Decode(msg *nats.Msg, v interface{}) error

func (*LoopbackNatsClient) Publish

func (c *LoopbackNatsClient) Publish(subject string, message interface{}) error

func (*LoopbackNatsClient) Subscribe

func (c *LoopbackNatsClient) Subscribe(subject string, ch chan *nats.Msg) (NatsSubscription, error)

type LruCache

type LruCache struct {
	// contains filtered or unexported fields
}

func NewLruCache

func NewLruCache(size int) *LruCache

func (*LruCache) Get

func (c *LruCache) Get(key string) interface{}

func (*LruCache) Len

func (c *LruCache) Len() int

func (*LruCache) Remove

func (c *LruCache) Remove(key string)

func (*LruCache) RemoveOldest

func (c *LruCache) RemoveOldest()

func (*LruCache) Set

func (c *LruCache) Set(key string, value interface{})

type Mcu

type Mcu interface {
	Start() error
	Stop()
	Reload(config *goconf.ConfigFile)

	SetOnConnected(func())
	SetOnDisconnected(func())

	GetStats() interface{}

	NewPublisher(ctx context.Context, listener McuListener, id string, sid string, streamType StreamType, bitrate int, mediaTypes MediaType, initiator McuInitiator) (McuPublisher, error)
	NewSubscriber(ctx context.Context, listener McuListener, publisher string, streamType StreamType) (McuSubscriber, error)
}

func NewMcuJanus

func NewMcuJanus(url string, config *goconf.ConfigFile) (Mcu, error)

func NewMcuProxy

func NewMcuProxy(config *goconf.ConfigFile, etcdClient *EtcdClient, rpcClients *GrpcClients, dnsMonitor *DnsMonitor) (Mcu, error)

type McuClient

type McuClient interface {
	Id() string
	Sid() string
	StreamType() StreamType
	MaxBitrate() int

	Close(ctx context.Context)

	SendMessage(ctx context.Context, message *MessageClientMessage, data *MessageClientMessageData, callback func(error, map[string]interface{}))
}

type McuInitiator

type McuInitiator interface {
	Country() string
}

type McuListener

type McuListener interface {
	PublicId() string

	OnUpdateOffer(client McuClient, offer map[string]interface{})

	OnIceCandidate(client McuClient, candidate interface{})
	OnIceCompleted(client McuClient)

	SubscriberSidUpdated(subscriber McuSubscriber)

	PublisherClosed(publisher McuPublisher)
	SubscriberClosed(subscriber McuSubscriber)
}

type McuProxy added in v1.2.3

type McuProxy interface {
	AddConnection(ignoreErrors bool, url string, ips ...net.IP) error
	KeepConnection(url string, ips ...net.IP)
	RemoveConnection(url string, ips ...net.IP)
}

type McuPublisher

type McuPublisher interface {
	McuClient

	HasMedia(MediaType) bool
	SetMedia(MediaType)
}

type McuSubscriber

type McuSubscriber interface {
	McuClient

	Publisher() string
}

type MediaType added in v0.4.0

type MediaType int
const (
	MediaTypeAudio  MediaType = 1 << 0
	MediaTypeVideo  MediaType = 1 << 1
	MediaTypeScreen MediaType = 1 << 2
)

type MessageClientMessage

type MessageClientMessage struct {
	Recipient MessageClientMessageRecipient `json:"recipient"`

	Data *json.RawMessage `json:"data"`
}

func (*MessageClientMessage) CheckValid

func (m *MessageClientMessage) CheckValid() error

type MessageClientMessageData

type MessageClientMessageData struct {
	Type     string                 `json:"type"`
	Sid      string                 `json:"sid"`
	RoomType string                 `json:"roomType"`
	Bitrate  int                    `json:"bitrate,omitempty"`
	Payload  map[string]interface{} `json:"payload"`
}

func (*MessageClientMessageData) CheckValid added in v1.2.4

func (m *MessageClientMessageData) CheckValid() error

type MessageClientMessageRecipient

type MessageClientMessageRecipient struct {
	Type string `json:"type"`

	SessionId string `json:"sessionid,omitempty"`
	UserId    string `json:"userid,omitempty"`
}

type MessageServerMessage

type MessageServerMessage struct {
	Sender    *MessageServerMessageSender    `json:"sender"`
	Recipient *MessageClientMessageRecipient `json:"recipient,omitempty"`

	Data *json.RawMessage `json:"data"`
}

type MessageServerMessageData

type MessageServerMessageData struct {
	Type string `json:"type"`

	Chat *MessageServerMessageDataChat `json:"chat,omitempty"`
}

type MessageServerMessageDataChat

type MessageServerMessageDataChat struct {
	Refresh bool `json:"refresh"`
}

type MessageServerMessageSender

type MessageServerMessageSender struct {
	Type string `json:"type"`

	SessionId string `json:"sessionid,omitempty"`
	UserId    string `json:"userid,omitempty"`
}

type NatsClient

type NatsClient interface {
	Close()

	Subscribe(subject string, ch chan *nats.Msg) (NatsSubscription, error)
	Publish(subject string, message interface{}) error

	Decode(msg *nats.Msg, v interface{}) error
}

func NewLoopbackNatsClient

func NewLoopbackNatsClient() (NatsClient, error)

func NewNatsClient

func NewNatsClient(url string) (NatsClient, error)

type NatsSubscription

type NatsSubscription interface {
	Unsubscribe() error
}

type Notifier

type Notifier struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*Notifier) NewWaiter

func (n *Notifier) NewWaiter(key string) *Waiter

func (*Notifier) Notify

func (n *Notifier) Notify(key string)

func (*Notifier) Release

func (n *Notifier) Release(w *Waiter)

func (*Notifier) Reset

func (n *Notifier) Reset()

type OcsBody

type OcsBody struct {
	Meta OcsMeta          `json:"meta"`
	Data *json.RawMessage `json:"data"`
}

type OcsMeta

type OcsMeta struct {
	Status     string `json:"status"`
	StatusCode int    `json:"statuscode"`
	Message    string `json:"message"`
}

type OcsResponse

type OcsResponse struct {
	json.Marshaler
	json.Unmarshaler

	Ocs *OcsBody `json:"ocs"`
}

type PayloadProxyClientMessage

type PayloadProxyClientMessage struct {
	Type string `json:"type"`

	ClientId string                 `json:"clientId"`
	Sid      string                 `json:"sid,omitempty"`
	Payload  map[string]interface{} `json:"payload,omitempty"`
}

func (*PayloadProxyClientMessage) CheckValid

func (m *PayloadProxyClientMessage) CheckValid() error

type PayloadProxyServerMessage

type PayloadProxyServerMessage struct {
	Type string `json:"type"`

	ClientId string                 `json:"clientId"`
	Payload  map[string]interface{} `json:"payload"`
}

type Permission

type Permission string
var (
	PERMISSION_MAY_PUBLISH_MEDIA  Permission = "publish-media"
	PERMISSION_MAY_PUBLISH_AUDIO  Permission = "publish-audio"
	PERMISSION_MAY_PUBLISH_VIDEO  Permission = "publish-video"
	PERMISSION_MAY_PUBLISH_SCREEN Permission = "publish-screen"
	PERMISSION_MAY_CONTROL        Permission = "control"
	PERMISSION_TRANSIENT_DATA     Permission = "transient-data"
	PERMISSION_HIDE_DISPLAYNAMES  Permission = "hide-displaynames"

	// DefaultPermissionOverrides contains permission overrides for users where
	// no permissions have been set by the server. If a permission is not set in
	// this map, it's assumed the user has that permission.
	DefaultPermissionOverrides = map[Permission]bool{
		PERMISSION_HIDE_DISPLAYNAMES: false,
	}
)

type PermissionError added in v0.4.0

type PermissionError struct {
	// contains filtered or unexported fields
}

func (*PermissionError) Error added in v0.4.0

func (e *PermissionError) Error() string

func (*PermissionError) Permission added in v0.4.0

func (e *PermissionError) Permission() Permission

type Pool added in v0.5.0

type Pool struct {
	// contains filtered or unexported fields
}

func (*Pool) Put added in v0.5.0

func (p *Pool) Put(c *http.Client)

type ProxyClientMessage

type ProxyClientMessage struct {
	json.Marshaler
	json.Unmarshaler

	// The unique request id (optional).
	Id string `json:"id,omitempty"`

	// The type of the request.
	Type string `json:"type"`

	// Filled for type "hello"
	Hello *HelloProxyClientMessage `json:"hello,omitempty"`

	Bye *ByeProxyClientMessage `json:"bye,omitempty"`

	Command *CommandProxyClientMessage `json:"command,omitempty"`

	Payload *PayloadProxyClientMessage `json:"payload,omitempty"`
}

func (*ProxyClientMessage) CheckValid

func (m *ProxyClientMessage) CheckValid() error

func (*ProxyClientMessage) NewErrorServerMessage

func (m *ProxyClientMessage) NewErrorServerMessage(e *Error) *ProxyServerMessage

func (*ProxyClientMessage) NewWrappedErrorServerMessage

func (m *ProxyClientMessage) NewWrappedErrorServerMessage(e error) *ProxyServerMessage

type ProxyConfig added in v1.2.3

type ProxyConfig interface {
	Start() error
	Stop()

	Reload(config *goconf.ConfigFile) error
}

func NewProxyConfigEtcd added in v1.2.3

func NewProxyConfigEtcd(config *goconf.ConfigFile, etcdClient *EtcdClient, proxy McuProxy) (ProxyConfig, error)

func NewProxyConfigStatic added in v1.2.3

func NewProxyConfigStatic(config *goconf.ConfigFile, proxy McuProxy, dnsMonitor *DnsMonitor) (ProxyConfig, error)

type ProxyInformationEtcd

type ProxyInformationEtcd struct {
	Address string `json:"address"`
}

func (*ProxyInformationEtcd) CheckValid

func (p *ProxyInformationEtcd) CheckValid() error

type ProxyServerMessage

type ProxyServerMessage struct {
	json.Marshaler
	json.Unmarshaler

	Id string `json:"id,omitempty"`

	Type string `json:"type"`

	Error *Error `json:"error,omitempty"`

	Hello *HelloProxyServerMessage `json:"hello,omitempty"`

	Bye *ByeProxyServerMessage `json:"bye,omitempty"`

	Command *CommandProxyServerMessage `json:"command,omitempty"`

	Payload *PayloadProxyServerMessage `json:"payload,omitempty"`

	Event *EventProxyServerMessage `json:"event,omitempty"`
}

ProxyServerMessage is a message that is sent from the server to a client.

func (*ProxyServerMessage) CloseAfterSend

func (r *ProxyServerMessage) CloseAfterSend(session Session) bool

type RemoveSessionInternalClientMessage

type RemoveSessionInternalClientMessage struct {
	CommonSessionInternalClientMessage

	UserId string `json:"userid,omitempty"`
}

func (*RemoveSessionInternalClientMessage) CheckValid

func (m *RemoveSessionInternalClientMessage) CheckValid() error

type ResponseHandlerFunc added in v1.2.0

type ResponseHandlerFunc func(message *ClientMessage) bool

ResponseHandlerFunc will return "true" has been fully processed.

type Room

type Room struct {
	// contains filtered or unexported fields
}

func NewRoom

func NewRoom(roomId string, properties *json.RawMessage, hub *Hub, events AsyncEvents, backend *Backend) (*Room, error)

func (*Room) AddSession

func (r *Room) AddSession(session Session, sessionData *json.RawMessage)

func (*Room) Backend

func (r *Room) Backend() *Backend

func (*Room) Close

func (r *Room) Close() []Session

func (*Room) GetRoomSessionData

func (r *Room) GetRoomSessionData(session Session) *RoomSessionData

func (*Room) HasSession

func (r *Room) HasSession(session Session) bool

func (*Room) Id

func (r *Room) Id() string

func (*Room) IsEqual added in v0.4.0

func (r *Room) IsEqual(other *Room) bool

func (*Room) IsSessionInCall added in v0.4.0

func (r *Room) IsSessionInCall(session Session) bool

func (*Room) NotifySessionChanged

func (r *Room) NotifySessionChanged(session Session, flags SessionChangeFlag)

func (*Room) NotifySessionResumed

func (r *Room) NotifySessionResumed(session *ClientSession)

func (*Room) ProcessBackendRoomRequest added in v1.0.0

func (r *Room) ProcessBackendRoomRequest(message *AsyncMessage)

func (*Room) Properties

func (r *Room) Properties() *json.RawMessage

func (*Room) PublishSessionJoined

func (r *Room) PublishSessionJoined(session Session, sessionData *RoomSessionData)

func (*Room) PublishSessionLeft

func (r *Room) PublishSessionLeft(session Session)

func (*Room) PublishUsersChanged

func (r *Room) PublishUsersChanged(changed []map[string]interface{}, users []map[string]interface{})

func (*Room) PublishUsersInCallChanged

func (r *Room) PublishUsersInCallChanged(changed []map[string]interface{}, users []map[string]interface{})

func (*Room) PublishUsersInCallChangedAll added in v0.5.0

func (r *Room) PublishUsersInCallChangedAll(inCall int)

func (*Room) RemoveSession

func (r *Room) RemoveSession(session Session) bool

Returns "true" if there are still clients in the room.

func (*Room) RemoveTransientData added in v0.5.0

func (r *Room) RemoveTransientData(key string)

func (*Room) SetTransientData added in v0.5.0

func (r *Room) SetTransientData(key string, value interface{})

func (*Room) SetTransientDataTTL added in v1.2.0

func (r *Room) SetTransientDataTTL(key string, value interface{}, ttl time.Duration)

func (*Room) UpdateProperties

func (r *Room) UpdateProperties(properties *json.RawMessage)

type RoomClientMessage

type RoomClientMessage struct {
	RoomId    string `json:"roomid"`
	SessionId string `json:"sessionid,omitempty"`
}

func (*RoomClientMessage) CheckValid

func (m *RoomClientMessage) CheckValid() error

type RoomDisinviteEventServerMessage

type RoomDisinviteEventServerMessage struct {
	RoomEventServerMessage

	Reason string `json:"reason"`
}

type RoomErrorDetails added in v1.2.0

type RoomErrorDetails struct {
	Room *RoomServerMessage `json:"room"`
}

type RoomEventMessage

type RoomEventMessage struct {
	RoomId string           `json:"roomid"`
	Data   *json.RawMessage `json:"data,omitempty"`
}

type RoomEventMessageData added in v0.5.0

type RoomEventMessageData struct {
	Type string `json:"type"`

	Chat *RoomEventMessageDataChat `json:"chat,omitempty"`
}

type RoomEventMessageDataChat added in v0.5.0

type RoomEventMessageDataChat struct {
	Comment *ChatComment `json:"comment,omitempty"`
}

type RoomEventServerMessage

type RoomEventServerMessage struct {
	RoomId     string           `json:"roomid"`
	Properties *json.RawMessage `json:"properties,omitempty"`
	// TODO(jojo): Change "InCall" to "int" when #914 has landed in NC Talk.
	InCall  *json.RawMessage         `json:"incall,omitempty"`
	Changed []map[string]interface{} `json:"changed,omitempty"`
	Users   []map[string]interface{} `json:"users,omitempty"`

	All bool `json:"all,omitempty"`
}

func (*RoomEventServerMessage) String added in v1.0.0

func (m *RoomEventServerMessage) String() string

type RoomFlagsServerMessage

type RoomFlagsServerMessage struct {
	RoomId    string `json:"roomid"`
	SessionId string `json:"sessionid"`
	Flags     uint32 `json:"flags"`
}

type RoomPing added in v0.5.0

type RoomPing struct {
	// contains filtered or unexported fields
}

RoomPing sends ping requests for active sessions in rooms. It evaluates the capabilities of the Nextcloud server to determine if sessions from different rooms can be grouped together.

For that, all ping requests across rooms of enabled instances are combined and sent out batched every "updateActiveSessionsInterval" seconds.

func NewRoomPing added in v0.5.0

func NewRoomPing(backend *BackendClient, capabilities *Capabilities) (*RoomPing, error)

func (*RoomPing) DeleteRoom added in v0.5.0

func (p *RoomPing) DeleteRoom(room *Room)

func (*RoomPing) SendPings added in v0.5.0

func (p *RoomPing) SendPings(ctx context.Context, room *Room, url *url.URL, entries []BackendPingEntry) error

func (*RoomPing) Start added in v0.5.0

func (p *RoomPing) Start()

func (*RoomPing) Stop added in v0.5.0

func (p *RoomPing) Stop()

type RoomServerMessage

type RoomServerMessage struct {
	RoomId     string           `json:"roomid"`
	Properties *json.RawMessage `json:"properties,omitempty"`
}

type RoomSessionData

type RoomSessionData struct {
	UserId string `json:"userid,omitempty"`
}

type RoomSessions

type RoomSessions interface {
	SetRoomSession(session Session, roomSessionId string) error
	DeleteRoomSession(session Session)

	GetSessionId(roomSessionId string) (string, error)
	LookupSessionId(ctx context.Context, roomSessionId string, disconnectReason string) (string, error)
}

func NewBuiltinRoomSessions

func NewBuiltinRoomSessions(clients *GrpcClients) (RoomSessions, error)

type SdpError added in v0.4.0

type SdpError struct {
	// contains filtered or unexported fields
}

func (*SdpError) Error added in v0.4.0

func (e *SdpError) Error() string

type SendOfferMessage added in v1.0.0

type SendOfferMessage struct {
	MessageId string                    `json:"messageid,omitempty"`
	SessionId string                    `json:"sessionid"`
	Data      *MessageClientMessageData `json:"data"`
}

type ServerMessage

type ServerMessage struct {
	json.Marshaler
	json.Unmarshaler

	Id string `json:"id,omitempty"`

	Type string `json:"type"`

	Error *Error `json:"error,omitempty"`

	Welcome *WelcomeServerMessage `json:"welcome,omitempty"`

	Hello *HelloServerMessage `json:"hello,omitempty"`

	Bye *ByeServerMessage `json:"bye,omitempty"`

	Room *RoomServerMessage `json:"room,omitempty"`

	Message *MessageServerMessage `json:"message,omitempty"`

	Control *ControlServerMessage `json:"control,omitempty"`

	Event *EventServerMessage `json:"event,omitempty"`

	TransientData *TransientDataServerMessage `json:"transient,omitempty"`

	Internal *InternalServerMessage `json:"internal,omitempty"`

	Dialout *DialoutInternalClientMessage `json:"dialout,omitempty"`
}

ServerMessage is a message that is sent from the server to a client.

func (*ServerMessage) CloseAfterSend

func (r *ServerMessage) CloseAfterSend(session Session) bool

func (*ServerMessage) IsChatRefresh

func (r *ServerMessage) IsChatRefresh() bool

func (*ServerMessage) IsParticipantsUpdate

func (r *ServerMessage) IsParticipantsUpdate() bool

func (*ServerMessage) String

func (r *ServerMessage) String() string

type Session

type Session interface {
	PrivateId() string
	PublicId() string
	ClientType() string
	Data() *SessionIdData

	UserId() string
	UserData() *json.RawMessage

	Backend() *Backend
	BackendUrl() string
	ParsedBackendUrl() *url.URL

	SetRoom(room *Room)
	GetRoom() *Room
	LeaveRoom(notify bool) *Room

	IsExpired(now time.Time) bool
	Close()

	HasPermission(permission Permission) bool
}

type SessionChangeFlag added in v1.1.0

type SessionChangeFlag int
const (
	SessionChangeFlags  SessionChangeFlag = 1
	SessionChangeInCall SessionChangeFlag = 2
)

type SessionIdData

type SessionIdData struct {
	Sid       uint64
	Created   time.Time
	BackendId string
}

type SingleNotifier added in v1.0.0

type SingleNotifier struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*SingleNotifier) NewWaiter added in v1.0.0

func (n *SingleNotifier) NewWaiter() *SingleWaiter

func (*SingleNotifier) Notify added in v1.0.0

func (n *SingleNotifier) Notify()

func (*SingleNotifier) Release added in v1.0.0

func (n *SingleNotifier) Release(w *SingleWaiter)

func (*SingleNotifier) Reset added in v1.0.0

func (n *SingleNotifier) Reset()

type SingleWaiter added in v1.0.0

type SingleWaiter struct {
	// contains filtered or unexported fields
}

func (*SingleWaiter) Wait added in v1.0.0

func (w *SingleWaiter) Wait(ctx context.Context) error

type StreamType added in v1.2.4

type StreamType string
const (
	StreamTypeAudio  StreamType = "audio"
	StreamTypeVideo  StreamType = "video"
	StreamTypeScreen StreamType = "screen"
)

type TokenClaims

type TokenClaims struct {
	jwt.RegisteredClaims
}

type TransientAction added in v1.2.0

type TransientAction string
const (
	TransientActionSet    TransientAction = "set"
	TransientActionDelete TransientAction = "delete"
)

type TransientData added in v0.5.0

type TransientData struct {
	// contains filtered or unexported fields
}

func NewTransientData added in v0.5.0

func NewTransientData() *TransientData

NewTransientData creates a new transient data container.

func (*TransientData) AddListener added in v0.5.0

func (t *TransientData) AddListener(listener TransientListener)

AddListener adds a new listener to be notified about changes.

func (*TransientData) CompareAndRemove added in v0.5.0

func (t *TransientData) CompareAndRemove(key string, old interface{}) bool

CompareAndRemove deletes the value with the given key if it has a given value and notifies listeners if the key was removed.

func (*TransientData) CompareAndSet added in v0.5.0

func (t *TransientData) CompareAndSet(key string, old, value interface{}) bool

CompareAndSet sets a new value for the given key only for a given old value and notifies listeners if the value has been changed.

func (*TransientData) CompareAndSetTTL added in v1.2.0

func (t *TransientData) CompareAndSetTTL(key string, old, value interface{}, ttl time.Duration) bool

CompareAndSetTTL sets a new value for the given key with a time-to-live, only for a given old value and notifies listeners if the value has been changed.

func (*TransientData) GetData added in v0.5.0

func (t *TransientData) GetData() map[string]interface{}

GetData returns a copy of the internal data.

func (*TransientData) Remove added in v0.5.0

func (t *TransientData) Remove(key string) bool

Remove deletes the value with the given key and notifies listeners if the key was removed.

func (*TransientData) RemoveListener added in v0.5.0

func (t *TransientData) RemoveListener(listener TransientListener)

RemoveListener removes a previously registered listener.

func (*TransientData) Set added in v0.5.0

func (t *TransientData) Set(key string, value interface{}) bool

Set sets a new value for the given key and notifies listeners if the value has been changed.

func (*TransientData) SetTTL added in v1.2.0

func (t *TransientData) SetTTL(key string, value interface{}, ttl time.Duration) bool

SetTTL sets a new value for the given key with a time-to-live and notifies listeners if the value has been changed.

type TransientDataClientMessage added in v0.5.0

type TransientDataClientMessage struct {
	Type string `json:"type"`

	Key   string           `json:"key,omitempty"`
	Value *json.RawMessage `json:"value,omitempty"`
	TTL   time.Duration    `json:"ttl,omitempty"`
}

func (*TransientDataClientMessage) CheckValid added in v0.5.0

func (m *TransientDataClientMessage) CheckValid() error

type TransientDataServerMessage added in v0.5.0

type TransientDataServerMessage struct {
	Type string `json:"type"`

	Key      string                 `json:"key,omitempty"`
	OldValue interface{}            `json:"oldvalue,omitempty"`
	Value    interface{}            `json:"value,omitempty"`
	Data     map[string]interface{} `json:"data,omitempty"`
}

type TransientListener added in v0.5.0

type TransientListener interface {
	SendMessage(message *ServerMessage) bool
}

type TrickleMsg

type TrickleMsg struct {
	Session   uint64 `json:"session_id"`
	Handle    uint64 `json:"sender"`
	Candidate struct {
		SdpMid        string `json:"sdpMid"`
		SdpMLineIndex int    `json:"sdpMLineIndex"`
		Candidate     string `json:"candidate"`

		Completed bool `json:"completed,omitempty"`
	} `json:"candidate"`
}

type TurnCredentials

type TurnCredentials struct {
	Username string   `json:"username"`
	Password string   `json:"password"`
	TTL      int64    `json:"ttl"`
	URIs     []string `json:"uris"`
}

See https://tools.ietf.org/html/draft-uberti-behave-turn-rest-00

type UpdateSessionInternalClientMessage

type UpdateSessionInternalClientMessage struct {
	CommonSessionInternalClientMessage

	Flags  *uint32 `json:"flags,omitempty"`
	InCall *int    `json:"incall,omitempty"`
}

func (*UpdateSessionInternalClientMessage) CheckValid

func (m *UpdateSessionInternalClientMessage) CheckValid() error

type VirtualSession

type VirtualSession struct {
	// contains filtered or unexported fields
}

func NewVirtualSession

func NewVirtualSession(session *ClientSession, privateId string, publicId string, data *SessionIdData, msg *AddSessionInternalClientMessage) (*VirtualSession, error)

func (*VirtualSession) AddFlags

func (s *VirtualSession) AddFlags(flags uint32) bool

func (*VirtualSession) Backend

func (s *VirtualSession) Backend() *Backend

func (*VirtualSession) BackendUrl

func (s *VirtualSession) BackendUrl() string

func (*VirtualSession) ClientType

func (s *VirtualSession) ClientType() string

func (*VirtualSession) Close

func (s *VirtualSession) Close()

func (*VirtualSession) CloseWithFeedback

func (s *VirtualSession) CloseWithFeedback(session *ClientSession, message *ClientMessage)

func (*VirtualSession) Data

func (s *VirtualSession) Data() *SessionIdData

func (*VirtualSession) Flags

func (s *VirtualSession) Flags() uint32

func (*VirtualSession) GetInCall added in v1.1.0

func (s *VirtualSession) GetInCall() int

func (*VirtualSession) GetRoom

func (s *VirtualSession) GetRoom() *Room

func (*VirtualSession) HasPermission

func (s *VirtualSession) HasPermission(permission Permission) bool

func (*VirtualSession) IsExpired

func (s *VirtualSession) IsExpired(now time.Time) bool

func (*VirtualSession) LeaveRoom

func (s *VirtualSession) LeaveRoom(notify bool) *Room

func (*VirtualSession) Options

func (s *VirtualSession) Options() *AddSessionOptions

func (*VirtualSession) ParsedBackendUrl

func (s *VirtualSession) ParsedBackendUrl() *url.URL

func (*VirtualSession) PrivateId

func (s *VirtualSession) PrivateId() string

func (*VirtualSession) ProcessAsyncSessionMessage added in v1.0.0

func (s *VirtualSession) ProcessAsyncSessionMessage(message *AsyncMessage)

func (*VirtualSession) PublicId

func (s *VirtualSession) PublicId() string

func (*VirtualSession) RemoveFlags

func (s *VirtualSession) RemoveFlags(flags uint32) bool

func (*VirtualSession) Session

func (s *VirtualSession) Session() *ClientSession

func (*VirtualSession) SessionId

func (s *VirtualSession) SessionId() string

func (*VirtualSession) SetFlags

func (s *VirtualSession) SetFlags(flags uint32) bool

func (*VirtualSession) SetInCall added in v1.1.0

func (s *VirtualSession) SetInCall(inCall int) bool

func (*VirtualSession) SetRoom

func (s *VirtualSession) SetRoom(room *Room)

func (*VirtualSession) UserData

func (s *VirtualSession) UserData() *json.RawMessage

func (*VirtualSession) UserId

func (s *VirtualSession) UserId() string

type Waiter

type Waiter struct {
	// contains filtered or unexported fields
}

func (*Waiter) Wait

func (w *Waiter) Wait(ctx context.Context) error

type WelcomeServerMessage added in v1.0.0

type WelcomeServerMessage struct {
	Version  string   `json:"version"`
	Features []string `json:"features,omitempty"`
	Country  string   `json:"country,omitempty"`
}

func NewWelcomeServerMessage added in v1.0.0

func NewWelcomeServerMessage(version string, feature ...string) *WelcomeServerMessage

func (*WelcomeServerMessage) AddFeature added in v1.0.0

func (m *WelcomeServerMessage) AddFeature(feature ...string)

func (*WelcomeServerMessage) RemoveFeature added in v1.0.0

func (m *WelcomeServerMessage) RemoveFeature(feature ...string)

type WrappedSdpError added in v0.4.0

type WrappedSdpError struct {
	SdpError
	// contains filtered or unexported fields
}

func (*WrappedSdpError) Unwrap added in v0.4.0

func (e *WrappedSdpError) Unwrap() error

type WritableClientMessage

type WritableClientMessage interface {
	json.Marshaler

	CloseAfterSend(session Session) bool
}

Directories

Path Synopsis
*
*
*
*
*
*

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL