encoding

package
v4.39.2 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_transport_internet_grpc_encoding_stream_proto protoreflect.FileDescriptor
View Source
var GunService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "v2ray.core.transport.internet.grpc.encoding.GunService",
	HandlerType: (*GunServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Tun",
			Handler:       _GunService_Tun_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "transport/internet/grpc/encoding/stream.proto",
}

GunService_ServiceDesc is the grpc.ServiceDesc for GunService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterGunServiceServer

func RegisterGunServiceServer(s grpc.ServiceRegistrar, srv GunServiceServer)

func RegisterGunServiceServerX

func RegisterGunServiceServerX(s *grpc.Server, srv GunServiceServer, name string)

func ServerDesc

func ServerDesc(name string) grpc.ServiceDesc

Types

type GunConn added in v4.36.1

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

GunConn implements net.Conn for gun tunnel

func NewGunConn added in v4.36.1

func NewGunConn(service GunService, over context.CancelFunc) *GunConn

NewGunConn creates GunConn which handles gun tunnel

func (*GunConn) Close added in v4.36.1

func (c *GunConn) Close() error

Close implements net.Conn.Close()

func (*GunConn) LocalAddr added in v4.36.1

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

LocalAddr implements net.Conn.LocalAddr()

func (*GunConn) Read added in v4.36.1

func (c *GunConn) Read(b []byte) (n int, err error)

Read implements net.Conn.Read()

func (*GunConn) RemoteAddr added in v4.36.1

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

RemoteAddr implements net.Conn.RemoteAddr()

func (*GunConn) SetDeadline added in v4.36.1

func (*GunConn) SetDeadline(time.Time) error

SetDeadline implements net.Conn.SetDeadline()

func (*GunConn) SetReadDeadline added in v4.36.1

func (*GunConn) SetReadDeadline(time.Time) error

SetReadDeadline implements net.Conn.SetReadDeadline()

func (*GunConn) SetWriteDeadline added in v4.36.1

func (*GunConn) SetWriteDeadline(time.Time) error

SetWriteDeadline implements net.Conn.SetWriteDeadline()

func (*GunConn) Write added in v4.36.1

func (c *GunConn) Write(b []byte) (n int, err error)

Write implements net.Conn.Write()

type GunService added in v4.36.1

type GunService interface {
	Context() context.Context
	Send(*Hunk) error
	Recv() (*Hunk, error)
}

GunService is the abstract interface of GunService_TunClient and GunService_TunServer

type GunServiceClient

type GunServiceClient interface {
	Tun(ctx context.Context, opts ...grpc.CallOption) (GunService_TunClient, error)
}

GunServiceClient is the client API for GunService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewGunServiceClient

func NewGunServiceClient(cc grpc.ClientConnInterface) GunServiceClient

type GunServiceClientX

type GunServiceClientX interface {
	TunCustomName(ctx context.Context, name string, opts ...grpc.CallOption) (GunService_TunClient, error)
	Tun(ctx context.Context, opts ...grpc.CallOption) (GunService_TunClient, error)
}

type GunServiceServer

type GunServiceServer interface {
	Tun(GunService_TunServer) error
	// contains filtered or unexported methods
}

GunServiceServer is the server API for GunService service. All implementations must embed UnimplementedGunServiceServer for forward compatibility

type GunService_TunClient

type GunService_TunClient interface {
	Send(*Hunk) error
	Recv() (*Hunk, error)
	grpc.ClientStream
}

type GunService_TunServer

type GunService_TunServer interface {
	Send(*Hunk) error
	Recv() (*Hunk, error)
	grpc.ServerStream
}

type Hunk

type Hunk struct {
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*Hunk) Descriptor deprecated

func (*Hunk) Descriptor() ([]byte, []int)

Deprecated: Use Hunk.ProtoReflect.Descriptor instead.

func (*Hunk) GetData

func (x *Hunk) GetData() []byte

func (*Hunk) ProtoMessage

func (*Hunk) ProtoMessage()

func (*Hunk) ProtoReflect

func (x *Hunk) ProtoReflect() protoreflect.Message

func (*Hunk) Reset

func (x *Hunk) Reset()

func (*Hunk) String

func (x *Hunk) String() string

type UnimplementedGunServiceServer

type UnimplementedGunServiceServer struct {
}

UnimplementedGunServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedGunServiceServer) Tun

type UnsafeGunServiceServer

type UnsafeGunServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeGunServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GunServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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