github.com/ava-labs/avalanchego@v1.11.11/network/conn_test.go (about)

     1  // Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved.
     2  // See the file LICENSE for licensing terms.
     3  
     4  package network
     5  
     6  import "net"
     7  
     8  var _ net.Conn = (*testConn)(nil)
     9  
    10  type testConn struct {
    11  	net.Conn
    12  
    13  	localAddr  net.Addr
    14  	remoteAddr net.Addr
    15  }
    16  
    17  func (c *testConn) LocalAddr() net.Addr {
    18  	return c.localAddr
    19  }
    20  
    21  func (c *testConn) RemoteAddr() net.Addr {
    22  	return c.remoteAddr
    23  }