Documentation ¶
Index ¶
- Variables
- func NewHunkConn(hc HunkConn, cancel context.CancelFunc) net.Conn
- func NewMultiHunkConn(hc MultiHunkConn, cancel context.CancelFunc) net.Conn
- func RegisterGRPCServiceServer(s grpc.ServiceRegistrar, srv GRPCServiceServer)
- func RegisterGRPCServiceServerX(s *grpc.Server, srv GRPCServiceServer, name, tun, tunMulti string)
- func ServerDesc(name, tun, tunMulti string) grpc.ServiceDesc
- type GRPCServiceClient
- type GRPCServiceClientX
- type GRPCServiceServer
- type GRPCService_TunClient
- type GRPCService_TunMultiClient
- type GRPCService_TunMultiServer
- type GRPCService_TunServer
- type Hunk
- type HunkConn
- type HunkReaderWriter
- type MultiHunk
- type MultiHunkConn
- type MultiHunkReaderWriter
- type StreamCloser
- type UnimplementedGRPCServiceServer
- type UnsafeGRPCServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_transport_internet_grpc_encoding_stream_proto protoreflect.FileDescriptor
var GRPCService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "xray.transport.internet.grpc.encoding.GRPCService", HandlerType: (*GRPCServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Tun", Handler: _GRPCService_Tun_Handler, ServerStreams: true, ClientStreams: true, }, { StreamName: "TunMulti", Handler: _GRPCService_TunMulti_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "transport/internet/grpc/encoding/stream.proto", }
GRPCService_ServiceDesc is the grpc.ServiceDesc for GRPCService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func NewHunkConn ¶
func NewHunkConn(hc HunkConn, cancel context.CancelFunc) net.Conn
func NewMultiHunkConn ¶
func NewMultiHunkConn(hc MultiHunkConn, cancel context.CancelFunc) net.Conn
func RegisterGRPCServiceServer ¶
func RegisterGRPCServiceServer(s grpc.ServiceRegistrar, srv GRPCServiceServer)
func RegisterGRPCServiceServerX ¶
func RegisterGRPCServiceServerX(s *grpc.Server, srv GRPCServiceServer, name, tun, tunMulti string)
func ServerDesc ¶
func ServerDesc(name, tun, tunMulti string) grpc.ServiceDesc
Types ¶
type GRPCServiceClient ¶
type GRPCServiceClient interface { Tun(ctx context.Context, opts ...grpc.CallOption) (GRPCService_TunClient, error) TunMulti(ctx context.Context, opts ...grpc.CallOption) (GRPCService_TunMultiClient, error) }
GRPCServiceClient is the client API for GRPCService 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 NewGRPCServiceClient ¶
func NewGRPCServiceClient(cc grpc.ClientConnInterface) GRPCServiceClient
type GRPCServiceClientX ¶
type GRPCServiceClientX interface { TunCustomName(ctx context.Context, name, tun string, opts ...grpc.CallOption) (GRPCService_TunClient, error) TunMultiCustomName(ctx context.Context, name, tunMulti string, opts ...grpc.CallOption) (GRPCService_TunMultiClient, error) Tun(ctx context.Context, opts ...grpc.CallOption) (GRPCService_TunClient, error) TunMulti(ctx context.Context, opts ...grpc.CallOption) (GRPCService_TunMultiClient, error) }
type GRPCServiceServer ¶
type GRPCServiceServer interface { Tun(GRPCService_TunServer) error TunMulti(GRPCService_TunMultiServer) error // contains filtered or unexported methods }
GRPCServiceServer is the server API for GRPCService service. All implementations must embed UnimplementedGRPCServiceServer for forward compatibility
type GRPCService_TunClient ¶
type GRPCService_TunServer ¶
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) ProtoMessage ¶
func (*Hunk) ProtoMessage()
func (*Hunk) ProtoReflect ¶
func (x *Hunk) ProtoReflect() protoreflect.Message
type HunkReaderWriter ¶
type HunkReaderWriter struct {
// contains filtered or unexported fields
}
func NewHunkReadWriter ¶
func NewHunkReadWriter(hc HunkConn, cancel context.CancelFunc) *HunkReaderWriter
func (*HunkReaderWriter) Close ¶
func (h *HunkReaderWriter) Close() error
func (*HunkReaderWriter) ReadMultiBuffer ¶
func (h *HunkReaderWriter) ReadMultiBuffer() (buf.MultiBuffer, error)
type MultiHunk ¶
type MultiHunk struct { Data [][]byte `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*MultiHunk) Descriptor
deprecated
func (*MultiHunk) ProtoMessage ¶
func (*MultiHunk) ProtoMessage()
func (*MultiHunk) ProtoReflect ¶
func (x *MultiHunk) ProtoReflect() protoreflect.Message
type MultiHunkConn ¶
type MultiHunkReaderWriter ¶
type MultiHunkReaderWriter struct {
// contains filtered or unexported fields
}
func NewMultiHunkReadWriter ¶
func NewMultiHunkReadWriter(hc MultiHunkConn, cancel context.CancelFunc) *MultiHunkReaderWriter
func (*MultiHunkReaderWriter) Close ¶
func (h *MultiHunkReaderWriter) Close() error
func (*MultiHunkReaderWriter) ReadMultiBuffer ¶
func (h *MultiHunkReaderWriter) ReadMultiBuffer() (buf.MultiBuffer, error)
func (*MultiHunkReaderWriter) WriteMultiBuffer ¶
func (h *MultiHunkReaderWriter) WriteMultiBuffer(mb buf.MultiBuffer) error
type StreamCloser ¶
type StreamCloser interface {
CloseSend() error
}
type UnimplementedGRPCServiceServer ¶
type UnimplementedGRPCServiceServer struct { }
UnimplementedGRPCServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedGRPCServiceServer) Tun ¶
func (UnimplementedGRPCServiceServer) Tun(GRPCService_TunServer) error
func (UnimplementedGRPCServiceServer) TunMulti ¶
func (UnimplementedGRPCServiceServer) TunMulti(GRPCService_TunMultiServer) error
type UnsafeGRPCServiceServer ¶
type UnsafeGRPCServiceServer interface {
// contains filtered or unexported methods
}
UnsafeGRPCServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GRPCServiceServer will result in compilation errors.