grpc

package
v0.0.0-...-e5d0cd3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanGlobalClientConnectionCache

func CleanGlobalClientConnectionCache()

Types

type ClientConn

type ClientConn struct {
	// contains filtered or unexported fields
}

func NewClientConn

func NewClientConn(tun proto.GunService_TunClient, closer context.CancelFunc) *ClientConn

func (*ClientConn) Close

func (c *ClientConn) Close() error

func (*ClientConn) CloseWrite

func (c *ClientConn) CloseWrite() error

func (*ClientConn) Read

func (c *ClientConn) Read(p []byte) (n int, err error)

func (*ClientConn) SetDeadline

func (c *ClientConn) SetDeadline(t time.Time) error

func (*ClientConn) SetReadDeadline

func (c *ClientConn) SetReadDeadline(t time.Time) error

func (*ClientConn) SetWriteDeadline

func (c *ClientConn) SetWriteDeadline(t time.Time) error

func (*ClientConn) Write

func (c *ClientConn) Write(p []byte) (n int, err error)

type Dialer

type Dialer struct {
	NextDialer    netproxy.ContextDialer
	ServiceName   string
	ServerName    string
	AllowInsecure bool
}

func (*Dialer) Dial

func (d *Dialer) Dial(network, address string) (netproxy.Conn, error)

func (*Dialer) DialContext

func (d *Dialer) DialContext(ctx context.Context, network string, address string) (netproxy.Conn, error)

type RecvResp

type RecvResp struct {
	// contains filtered or unexported fields
}

type Server

type Server struct {
	*grpc.Server
	LocalAddr  net.Addr
	HandleConn func(conn net.Conn) error
}

func (Server) Tun

func (Server) TunDatagram

func (g Server) TunDatagram(datagramServer proto.GunService_TunDatagramServer) error

type ServerConn

type ServerConn struct {
	// contains filtered or unexported fields
}

func NewServerConn

func NewServerConn(tun proto.GunService_TunServer, localAddr net.Addr) *ServerConn

func (*ServerConn) Close

func (c *ServerConn) Close() error

func (*ServerConn) LocalAddr

func (c *ServerConn) LocalAddr() net.Addr

func (*ServerConn) Read

func (c *ServerConn) Read(p []byte) (n int, err error)

func (*ServerConn) RemoteAddr

func (c *ServerConn) RemoteAddr() net.Addr

func (*ServerConn) SetDeadline

func (c *ServerConn) SetDeadline(t time.Time) error

func (*ServerConn) SetReadDeadline

func (c *ServerConn) SetReadDeadline(t time.Time) error

func (*ServerConn) SetWriteDeadline

func (c *ServerConn) SetWriteDeadline(t time.Time) error

func (*ServerConn) Write

func (c *ServerConn) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL