-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathserver.hws
56 lines (44 loc) · 1.54 KB
/
server.hws
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/****************************************************************
** **
** Name: ScreamerNet3 Server **
** Author: Dimitris Panokostas **
** **
****************************************************************/
Const #DEBUG = False
Const #SETTINGS = "settings.ini"
; Make sure we have Hollywood 7.1!
@VERSION 7,1
; This script requires the RapaGUI plugin
@REQUIRE "RapaGUI", {Link = True}
/*
** Information about this app
*/
@APPIDENTIFIER "com.blitterstudio.screamernet3_server"
@APPTITLE "ScreamerNet3 Server"
@APPVERSION "$VER: ScreamerNet3 Server v1.0 (2018-11-11)"
@APPCOPYRIGHT "(C) Copyright 2016-2018 Dimitris Panokostas"
@APPAUTHOR "Dimitris Panokostas"
@APPDESCRIPTION "The Server component for the ScreamerNet3 renderfarm network"
; The server GUI definition
@FILE 1, "serverUI.xml"
; Include the business logic library
@INCLUDE "serverlib.hws"
@INCLUDE "common.hws"
@DISPLAY {title="ScreamerNet3 Server"}
; dynamically create GUI from an external *.xml file definition
Local gui = ""
While Not Eof(1) Do gui = gui .. ReadLine(1)
moai.CreateApp(gui)
InstallEventHandler({
RapaGUI = p_EventFunc,
OnConnect = p_ClientConnected,
OnReceiveData = p_ReceiveData,
OnDisconnect = p_ClientDisconnected})
p_SetUIState("stopped")
prefs = {port$ = 2550, nick$ = "Server", lwsn$ = "", commandDir$ = ""}
LoadPrefs(prefs)
p_PrefsToGui()
clients = {}
Repeat
WaitEvent()
Forever