socket_pro 1.0.0__tar.gz → 1.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- socket_pro-1.2.0/PKG-INFO +13 -0
- {socket_pro-1.0.0 → socket_pro-1.2.0}/pyproject.toml +2 -2
- {socket_pro-1.0.0 → socket_pro-1.2.0}/socket_pro/socket_client.py +4 -3
- socket_pro-1.0.0/PKG-INFO +0 -19
- {socket_pro-1.0.0 → socket_pro-1.2.0}/README.md +0 -0
- {socket_pro-1.0.0 → socket_pro-1.2.0}/socket_pro/__init__.py +0 -0
- {socket_pro-1.0.0 → socket_pro-1.2.0}/socket_pro/example/__init__.py +0 -0
- {socket_pro-1.0.0 → socket_pro-1.2.0}/socket_pro/example/client_example.py +0 -0
- {socket_pro-1.0.0 → socket_pro-1.2.0}/socket_pro/socket_server_asyncio.py +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: socket_pro
|
|
3
|
+
Version: 1.2.0
|
|
4
|
+
Summary: socket 封装
|
|
5
|
+
Author: LiuWei
|
|
6
|
+
Author-email: 183074632@qq.com
|
|
7
|
+
Requires-Python: >=3.15,<4.0
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
|
|
11
|
+
# socket_pro
|
|
12
|
+
异步socket
|
|
13
|
+
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "socket_pro"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.2.0"
|
|
4
4
|
description = "socket 封装"
|
|
5
5
|
authors = ["LiuWei <183074632@qq.com>"]
|
|
6
6
|
readme = "README.md"
|
|
7
7
|
|
|
8
8
|
[tool.poetry.dependencies]
|
|
9
|
-
python = ">=3.
|
|
9
|
+
python = ">=3.15,<4.0"
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
[[tool.poetry.source]]
|
|
@@ -80,10 +80,11 @@ class SocketClient:
|
|
|
80
80
|
response = self.socket.recv(self.buffer_size)
|
|
81
81
|
return True, response.decode("UTF-8")
|
|
82
82
|
return True, "发送成功, 不需要等待回复"
|
|
83
|
-
except
|
|
84
|
-
self.
|
|
83
|
+
except TimeoutError:
|
|
84
|
+
error_message = f"发送数据成功但是 socket 服务端未在 {self.time_out} 秒内回复"
|
|
85
|
+
self.logger.warning(error_message)
|
|
85
86
|
self.disconnect()
|
|
86
|
-
return False,
|
|
87
|
+
return False, error_message
|
|
87
88
|
|
|
88
89
|
def __enter__(self):
|
|
89
90
|
"""实现上下文管理协议,进入时自动连接."""
|
socket_pro-1.0.0/PKG-INFO
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: socket_pro
|
|
3
|
-
Version: 1.0.0
|
|
4
|
-
Summary: socket 封装
|
|
5
|
-
Author: LiuWei
|
|
6
|
-
Author-email: 183074632@qq.com
|
|
7
|
-
Requires-Python: >=3.8,<=3.13
|
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
|
9
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
10
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
-
Description-Content-Type: text/markdown
|
|
16
|
-
|
|
17
|
-
# socket_pro
|
|
18
|
-
异步socket
|
|
19
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|