generated from pufereq/python-template
Compare commits
3 Commits
332ce3ffa1
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c48b69ecee | ||
|
2ef4adaaa1
|
|||
|
aa0703fcde
|
@@ -2,6 +2,14 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
## [0.5.0] - 2025-11-19
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- [`2ef4ada`](https://gitea.pufereq.pl/judas/judas_protocol/commit/2ef4adaaa1e872c3c622ec6c37966dda1c7665d3) **message.py**: add `CLOSE` msg constructor
|
||||||
|
- [`aa0703f`](https://gitea.pufereq.pl/judas/judas_protocol/commit/aa0703fcde9d531fc5eaf8d9c93b160422692387) **types.py**: add `CLOSE` msg ControlAction
|
||||||
|
- [`332ce3f`](https://gitea.pufereq.pl/judas/judas_protocol/commit/332ce3ffa16ba43d6af1ba71bce1bc633e1661a9) **message.py**: add `acknowledged` and `ack_required` properties
|
||||||
|
|
||||||
## [0.4.3] - 2025-10-05
|
## [0.4.3] - 2025-10-05
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ build-backend = "uv_build"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "judas_protocol"
|
name = "judas_protocol"
|
||||||
version = "0.4.3"
|
version = "0.5.0"
|
||||||
description = "The judas protocol"
|
description = "The judas protocol"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
authors = []
|
authors = []
|
||||||
|
|||||||
@@ -181,3 +181,20 @@ class Message:
|
|||||||
acknowledged=False,
|
acknowledged=False,
|
||||||
ack_required=True,
|
ack_required=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def close(cls) -> Message:
|
||||||
|
"""Create a CLOSE message.
|
||||||
|
Prompts the recipient to close the connection and not reconnect.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
Message: The created CLOSE message.
|
||||||
|
"""
|
||||||
|
return cls(
|
||||||
|
id_=None,
|
||||||
|
category=Category.CONTROL,
|
||||||
|
action=ControlAction.CLOSE,
|
||||||
|
payload={},
|
||||||
|
acknowledged=False,
|
||||||
|
ack_required=True,
|
||||||
|
)
|
||||||
|
|||||||
@@ -13,3 +13,4 @@ class Category(str, Enum):
|
|||||||
class ControlAction(str, Enum):
|
class ControlAction(str, Enum):
|
||||||
HELLO = "hello"
|
HELLO = "hello"
|
||||||
ACK = "ack"
|
ACK = "ack"
|
||||||
|
CLOSE = "close"
|
||||||
|
|||||||
Reference in New Issue
Block a user