Add Addr methods to METADAPT implementations
This commit is contained in:
11
metadaptb.go
11
metadaptb.go
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user