-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feature] Add common message type class to reduce hard-coding
- Loading branch information
Showing
5 changed files
with
63 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# -*- encoding:utf-8 -*- | ||
# ============================================== | ||
# Author: 陈建彰 | ||
# Description: | ||
# Time: 2023/12/27 11:59 | ||
# ============================================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# -*- coding:utf-8 _*- | ||
""" | ||
LIB-SSE CODE | ||
@author: Jeza Chen | ||
@license: GPL-3.0 License | ||
@file: services_manager.py | ||
@time: 2023/12/17 | ||
@contact: jeza@vip.qq.com | ||
@site: | ||
@software: PyCharm | ||
@description: constants shared by clients and servers | ||
""" | ||
|
||
|
||
# Types of messages that can be sent between the client and server | ||
class MsgType: | ||
# init echo | ||
INIT = "init" | ||
# service config | ||
CONFIG = "config" | ||
# upload encrypted databases | ||
UPLOAD_DB = "upload_edb" | ||
# for search request | ||
TOKEN = "token" | ||
RESULT = "result" | ||
# for debug | ||
CONTROL = "control" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters