Add Addr methods to METADAPT implementations

This commit is contained in:
2025-01-22 16:57:06 -05:00
parent b514c0d621
commit 9bad4d68f1
2 changed files with 18 additions and 5 deletions

View File

@@ -23,6 +23,14 @@ func (this *b) Close() error {
return this.underlying.Close()
}
func (this *b) LocalAddr() net.Addr {
return this.underlying.LocalAddr()
}
func (this *b) RemoteAddr() net.Addr {
return this.underlying.RemoteAddr()
}
func (this *b) OpenTrans() (Trans, error) {
stream, err := this.underlying.OpenStream()
if err != nil { return nil, err }
@@ -55,7 +63,8 @@ func (trans transB) Receive() (uint16, []byte, error) {
return decodeMessageB(trans.underlying)
}
// MultiConn represens a multiplexed stream-oriented transport for use in [B].
// MultiConn represens a multiplexed stream-oriented transport for use in
// [AdaptB].
type MultiConn interface {
// See documentation for [net.Conn].
io.Closer