mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 11:15:07 +03:00 
			
		
		
		
	Remove wrappedConn as unnecessary
This commit is contained in:
		
							parent
							
								
									1b3ec0b93f
								
							
						
					
					
						commit
						ce60609906
					
				
					 2 changed files with 0 additions and 65 deletions
				
			
		| 
						 | 
				
			
			@ -1,58 +0,0 @@
 | 
			
		|||
package yggdrasil
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"net"
 | 
			
		||||
	"time"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// wrappedConn implements net.Conn
 | 
			
		||||
type wrappedConn struct {
 | 
			
		||||
	c     net.Conn
 | 
			
		||||
	raddr net.Addr
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// wrappedAddr implements net.Addr
 | 
			
		||||
type wrappedAddr struct {
 | 
			
		||||
	network string
 | 
			
		||||
	addr    string
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (a *wrappedAddr) Network() string {
 | 
			
		||||
	return a.network
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (a *wrappedAddr) String() string {
 | 
			
		||||
	return a.addr
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *wrappedConn) Write(data []byte) (int, error) {
 | 
			
		||||
	return c.c.Write(data)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *wrappedConn) Read(data []byte) (int, error) {
 | 
			
		||||
	return c.c.Read(data)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *wrappedConn) SetDeadline(t time.Time) error {
 | 
			
		||||
	return c.c.SetDeadline(t)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *wrappedConn) SetReadDeadline(t time.Time) error {
 | 
			
		||||
	return c.c.SetReadDeadline(t)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *wrappedConn) SetWriteDeadline(t time.Time) error {
 | 
			
		||||
	return c.c.SetWriteDeadline(t)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *wrappedConn) Close() error {
 | 
			
		||||
	return c.c.Close()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *wrappedConn) LocalAddr() net.Addr {
 | 
			
		||||
	return c.c.LocalAddr()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *wrappedConn) RemoteAddr() net.Addr {
 | 
			
		||||
	return c.raddr
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -255,13 +255,6 @@ func (t *tcp) call(saddr string, options interface{}, sintf string) {
 | 
			
		|||
			if err != nil {
 | 
			
		||||
				return
 | 
			
		||||
			}
 | 
			
		||||
			conn = &wrappedConn{
 | 
			
		||||
				c: conn,
 | 
			
		||||
				raddr: &wrappedAddr{
 | 
			
		||||
					network: "tcp",
 | 
			
		||||
					addr:    saddr,
 | 
			
		||||
				},
 | 
			
		||||
			}
 | 
			
		||||
			t.handler(conn, false, dialerdst.String())
 | 
			
		||||
		} else {
 | 
			
		||||
			dst, err := net.ResolveTCPAddr("tcp", saddr)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue