feat rpc
- architecture tweaks for scalability - added option for global debug logs - added option for cef debug mode to run in browser only
This commit is contained in:
+10
-6
@@ -5,12 +5,19 @@ import {
|
||||
type PlayerMp,
|
||||
RPCEventType,
|
||||
RPCState,
|
||||
RpcWrapperConfig,
|
||||
Utils,
|
||||
} from './utils'
|
||||
|
||||
class Server extends Wrapper {
|
||||
constructor() {
|
||||
super()
|
||||
export class Server extends Wrapper {
|
||||
constructor(
|
||||
options: RpcWrapperConfig = {
|
||||
forceBrowserDevMode: false,
|
||||
},
|
||||
) {
|
||||
super(options)
|
||||
|
||||
if (!!options.forceBrowserDevMode) return
|
||||
|
||||
mp.events.add(
|
||||
Events.SERVER_EVENT_LISTENER,
|
||||
@@ -84,6 +91,3 @@ class Server extends Wrapper {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const server = new Server()
|
||||
export { server }
|
||||
|
||||
Reference in New Issue
Block a user