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 URLurlwith no auth.|WithCredentials(string, iceCredentials)WithCredentials(url, iceCredentials)represents ICE server at URLurlwith 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
tfor description of the fields. IfcontentInitializeris missing, content of a newly created groups is left empty. IfsignalServerUrlis missing, default server specified indefaultSignalServerUrlconstant is used. IfdefaultGroupAliasis not specified, "My group" is used.