pybrid-computing-native 0.11.7__cp313-cp313-win_amd64.whl
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.
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Copyright (c) 2024 anabrid GmbH
|
|
2
|
+
# Contact: https://www.anabrid.com/licensing/
|
|
3
|
+
# SPDX-License-Identifier: MIT OR GPL-2.0-or-later
|
|
4
|
+
|
|
5
|
+
"""Native high-performance transport layer.
|
|
6
|
+
|
|
7
|
+
This module provides C++ implementations of UDP and TCP transports
|
|
8
|
+
using standalone ASIO for networking.
|
|
9
|
+
"""
|
|
10
|
+
import asyncio
|
|
11
|
+
|
|
12
|
+
try:
|
|
13
|
+
from pybrid.native._impl import (
|
|
14
|
+
# Enums
|
|
15
|
+
BufferType,
|
|
16
|
+
RecvStatus,
|
|
17
|
+
RunState,
|
|
18
|
+
# Structs
|
|
19
|
+
RecvResult,
|
|
20
|
+
UDPStats,
|
|
21
|
+
TCPStats,
|
|
22
|
+
AcceptedSocket,
|
|
23
|
+
# Classes
|
|
24
|
+
UDPSocket,
|
|
25
|
+
TCPTransport,
|
|
26
|
+
TCPServer as _TCPServerImpl,
|
|
27
|
+
ControlChannel,
|
|
28
|
+
DataChannel,
|
|
29
|
+
SampleDecodingDataChannel,
|
|
30
|
+
LockFreeBuffer,
|
|
31
|
+
SampleLockFreeBuffer,
|
|
32
|
+
ProxyServer,
|
|
33
|
+
# Exceptions
|
|
34
|
+
MessageTooLargeError,
|
|
35
|
+
BufferFullError,
|
|
36
|
+
# Constants
|
|
37
|
+
MAX_UDP_PACKET_SIZE,
|
|
38
|
+
DEFAULT_TCP_MESSAGE_SIZE,
|
|
39
|
+
DEFAULT_TCP_CONNECT_TIMEOUT,
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
class TCPServer(_TCPServerImpl):
|
|
43
|
+
"""
|
|
44
|
+
TCP server wrapper that adds async serve_forever() method.
|
|
45
|
+
|
|
46
|
+
Inherits all functionality from the native TCPServer and adds
|
|
47
|
+
asyncio-compatible serve_forever() for CLI compatibility.
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
async def serve_forever(self):
|
|
51
|
+
"""
|
|
52
|
+
Wait until the server is stopped.
|
|
53
|
+
|
|
54
|
+
This is an asyncio-compatible method that blocks until
|
|
55
|
+
stop() is called, typically via Ctrl+C or shutdown signal.
|
|
56
|
+
"""
|
|
57
|
+
while self.is_running():
|
|
58
|
+
await asyncio.sleep(0.1)
|
|
59
|
+
|
|
60
|
+
# Backward compatibility aliases (deprecated)
|
|
61
|
+
UDPServer = UDPSocket # Deprecated: use UDPSocket instead
|
|
62
|
+
UDPTransport = UDPSocket # Deprecated: use UDPSocket instead
|
|
63
|
+
NATIVE_AVAILABLE = True
|
|
64
|
+
except ImportError as e:
|
|
65
|
+
NATIVE_AVAILABLE = False
|
|
66
|
+
_import_error = e
|
|
67
|
+
|
|
68
|
+
__all__ = [
|
|
69
|
+
"NATIVE_AVAILABLE",
|
|
70
|
+
"ControlChannel",
|
|
71
|
+
"BufferType",
|
|
72
|
+
"RecvStatus",
|
|
73
|
+
"RunState",
|
|
74
|
+
"RecvResult",
|
|
75
|
+
"UDPStats",
|
|
76
|
+
"TCPStats",
|
|
77
|
+
"AcceptedSocket",
|
|
78
|
+
"UDPSocket",
|
|
79
|
+
"UDPServer", # Deprecated: backward compatibility alias for UDPSocket
|
|
80
|
+
"UDPTransport", # Deprecated: backward compatibility alias for UDPSocket
|
|
81
|
+
"TCPTransport",
|
|
82
|
+
"TCPServer",
|
|
83
|
+
"DataChannel",
|
|
84
|
+
"SampleDecodingDataChannel",
|
|
85
|
+
"LockFreeBuffer",
|
|
86
|
+
"SampleLockFreeBuffer",
|
|
87
|
+
"ProxyServer",
|
|
88
|
+
"MessageTooLargeError",
|
|
89
|
+
"BufferFullError",
|
|
90
|
+
"MAX_UDP_PACKET_SIZE",
|
|
91
|
+
"DEFAULT_TCP_MESSAGE_SIZE",
|
|
92
|
+
"DEFAULT_TCP_CONNECT_TIMEOUT",
|
|
93
|
+
]
|
|
Binary file
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pybrid-computing-native
|
|
3
|
+
Version: 0.11.7
|
|
4
|
+
Summary: Native C++ extensions for pybrid-computing
|
|
5
|
+
Project-URL: Homepage, https://anabrid.com/
|
|
6
|
+
Project-URL: Repository, https://github.com/anabrid/pybrid-computing
|
|
7
|
+
Project-URL: Documentation, https://anabrid.dev/docs/pybrid/
|
|
8
|
+
Author-email: anabrid <pybrid-code@anabrid.com>
|
|
9
|
+
License-Expression: MIT OR GPL-2.0-or-later
|
|
10
|
+
Keywords: analog computing,hybrid computing,native,pybind11
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Programming Language :: C++
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Requires-Python: >=3.11
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
|
|
18
|
+
# pybrid computing native
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
pybrid/native/__init__.py,sha256=_IrKhx7e8mcIABdbKzWRemIYZ_Mq22s-8SZ0kn-0X2U,2606
|
|
2
|
+
pybrid/native/_impl.cp313-win_amd64.pyd,sha256=FBbOix_FBjzOxlu7PEfKq6yqebQYw7XSLLgOZ7yJhQ4,2300928
|
|
3
|
+
pybrid_computing_native-0.11.7.dist-info/METADATA,sha256=7yq5XY2lfbj76yg3AkqfRR3OKDHK2fGInhITTXyfgUU,722
|
|
4
|
+
pybrid_computing_native-0.11.7.dist-info/WHEEL,sha256=U86RWTX5lwrEySdIwUyAv9wPq4TF4zyellXoRgWwM1Q,96
|
|
5
|
+
pybrid_computing_native-0.11.7.dist-info/RECORD,,
|