feat: implement get_remote_address via delegation pattern

This commit is contained in:
acul71
2025-03-13 14:08:13 +01:00
committed by Paul Robinson
parent 798229cd3a
commit fabf2cefc4
8 changed files with 72 additions and 1 deletions

View File

@ -1,5 +1,6 @@
from typing import (
TYPE_CHECKING,
Optional,
)
import trio
@ -252,3 +253,7 @@ class MplexStream(IMuxedStream):
"""
self.write_deadline = ttl
return True
def get_remote_address(self) -> Optional[tuple[str, int]]:
"""Delegate to the parent Mplex connection."""
return self.muxed_conn.get_remote_address()