From 2465ef25b741dfc39df343e550e88fd0b61a6460 Mon Sep 17 00:00:00 2001 From: "Jose M. Guisado" Date: Thu, 25 Nov 2021 15:27:44 +0100 Subject: #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. --- src/ogRest.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/ogRest.py') 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 -- cgit v1.2.3-18-g5258