Module PocketMeshPeer.InitConfig
Initial configuration of the library that is passed into the init
function.
let defaultSignalServerUrl: string;
Default signal server (probably localhost:7777) that is used if no signal server is specified in
make
.
type iceCredentials
=
{
username: string,
credential: string,
}
;type iceServer
=
;|
Basic(string)
Basic(url)
represents ICE server at URLurl
with no auth.|
WithCredentials(string, iceCredentials)
WithCredentials(url, iceCredentials)
represents ICE server at URLurl
with specified credentials.Type representing one ICE server connection parameters.
type t
=
{
defaultGroupAlias: string,
Alias for the group that is automatically created on the first start.
contentInitializer: Crdt.t => Crdt.t,
Function that is used to initialize content of a newly created group.
signalServerUrl: string,
Default URL address of a WebSocket signal server.
iceServers: list(iceServer),
List of ICE servers (STUN, TURN, ...)
}
;
let make: ?contentInitializer:(Crdt.t => Crdt.t) => ?signalServerUrl:string => ?defaultGroupAlias:string => ?iceServers:list(iceServer) => unit => t;
Creates a new configuration. See
t
for description of the fields. IfcontentInitializer
is missing, content of a newly created groups is left empty. IfsignalServerUrl
is missing, default server specified indefaultSignalServerUrl
constant is used. IfdefaultGroupAlias
is not specified, "My group" is used.