mirror of
https://github.com/go-i2p/go-i2ptunnel.git
synced 2025-12-20 15:15:52 -05:00
1.6 KiB
1.6 KiB
tcpclient
-- import "github.com/go-i2p/go-i2ptunnel/lib/tcp/client"
Usage
type TCPClient
type TCPClient struct {
// I2P Connection to listen to the I2P network
*onramp.Garlic
// The I2P Tunnel config itself
i2pconv.TunnelConfig
// The remote I2P destination target
*i2pkeys.I2PAddr
// The tunnel status
i2ptunnel.I2PTunnelStatus
// Error history of the tunnel
Errors []i2ptunnel.I2PTunnelError
}
func NewTCPClient
func NewTCPClient(config i2pconv.TunnelConfig, samAddr string) (*TCPClient, error)
NewTCPClient creates a new TCP Client tunnel with the given configuration
func (*TCPClient) Address
func (t *TCPClient) Address() string
Get the tunnel's I2P address
func (*TCPClient) Error
func (t *TCPClient) Error() error
Get the tunnel's error message
func (*TCPClient) LocalAddress
func (t *TCPClient) LocalAddress() (string, error)
Get the tunnel's local host:port
func (*TCPClient) Name
func (t *TCPClient) Name() string
Get the tunnel's name
func (*TCPClient) Start
func (t *TCPClient) Start() error
Start the tunnel
func (*TCPClient) Status
func (t *TCPClient) Status() i2ptunnel.I2PTunnelStatus
Get the tunnel's status
func (*TCPClient) Stop
func (t *TCPClient) Stop() error
Stop the tunnel
func (*TCPClient) Target
func (t *TCPClient) Target() string
Get the tunnel's I2P target. Nil in the case of one-to-many clients like SOCKS5 and HTTP
func (*TCPClient) Type
func (t *TCPClient) Type() string
Get the tunnel's type