0.1.3 • Published 6 months ago

rtc-socket-connector-server v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

rtc-socket-connector-server

rtc-socket-connector-server is library for WebRTC connection.
This library used with rtc-socket-connector-client
It is easy to use WebRTC with rtc-socket-connector-server and rtc-socket-connector-client.
Example using this library: rtc-socket-connector-example

How to use

1. Create socket server

To use rtc-socket-connector-server, you need socket server. Create a socket server through the process below.

const express = require('express');
const app = express();
const http = require('http');
const server = http.createServer(app);
const { Server } = require("socket.io");
const socketServer = new Server(server);

2. add handlers to Socket Server

Use addRTCConnectionHandlers to handle socket messages form client.

const { addRTCConnectionHandlers } = require("rtc-socket-connector-server")

addRTCConnectionHandler(socketServer});

3. Start the server

Run script file to run express server.
A client will send socket messages to the express server. The express server will send messages from a client to target client.

API

addRTCConnectionHandler(server, option)

Arguments

  • server: Socket server created by using socket.io
  • option
    • debug<boolean>: Set true to log messages for initiating peer connections and ICE candidates.
0.1.2

6 months ago

0.1.1

6 months ago

0.1.3

6 months ago

0.1.0

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago