.......PS. [ZBXNEXT-2321] simplified the server code and refactored it according to the specification