feat: 增加日志模块
This commit is contained in:
@@ -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