feat: 增加日志模块
This commit is contained in:
1 parent
b700dab484
commit
212459a8e4
18 files changed
+938
-42
No files matched your search
@@ -72,6 +72,12 @@ class OmniTransport:
|
||||
def send(self, *, to: str, data: bytes) -> None:
|
||||
self._session.send(to=to, data=data)
|
||||
|
||||
def send_with_id(self, *, to: str, data: bytes) -> int:
|
||||
if not hasattr(self._session, 'send_with_id'):
|
||||
self._session.send(to=to, data=data)
|
||||
raise RuntimeError('send_with_id is not available on this omnisocket build')
|
||||
return int(self._session.send_with_id(to=to, data=data))
|
||||
|
||||
def recv(self, *, timeout_ms: int = -1):
|
||||
return self._session.recv(timeout_ms=timeout_ms)
|
||||
|
||||
|
||||
Reference in new issue
Block a user