summaryrefslogtreecommitdiffstats
path: root/src/ogRest.py
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2021-11-25 15:27:44 +0100
committerJose M. Guisado <jguisado@soleta.eu>2021-11-29 12:58:13 +0100
commit2465ef25b741dfc39df343e550e88fd0b61a6460 (patch)
treeb984c6b9439e0f80dc61fd1c61d0359622f6688d /src/ogRest.py
parent6ddc1da7cac98978f4d251c2c8732cb75e6337c1 (diff)
#1065 Add event datagram socket
ogClient can receive events via a datagram socket opened at 55885. This socket is only opened when in windows or linux mode, for event reporting from within the system. Events reported this way are sent back to ogServer via a 103 Early Hints HTTP message. Information regarding the event is sent in the response's payload.
Diffstat (limited to 'src/ogRest.py')
-rw-r--r--src/ogRest.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ogRest.py b/src/ogRest.py
index db6a60e..0207af0 100644
--- a/src/ogRest.py
+++ b/src/ogRest.py
@@ -54,6 +54,8 @@ class restResponse():
self.msg = 'HTTP/1.0 401 Unauthorized'
elif response == ogResponses.SERVICE_UNAVAILABLE:
self.msg = 'HTTP/1.0 503 Service Unavailable'
+ elif response == ogResponses.EARLY_HINTS:
+ self.msg = 'HTTP/1.0 103 Early Hints'
else:
return self.msg
@@ -244,6 +246,7 @@ class ogResponses(Enum):
INTERNAL_ERR=3
UNAUTHORIZED=4
SERVICE_UNAVAILABLE=5
+ EARLY_HINTS=6
class ogRest():
LOG_LENGTH = 32