Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterGunServiceServer(s grpc.ServiceRegistrar, srv GunServiceServer)
- func RegisterGunServiceServerX(s *grpc.Server, srv GunServiceServer, name string)
- func ServerDesc(name string) grpc.ServiceDesc
- type GunConn
- func (c *GunConn) Close() error
- func (c *GunConn) LocalAddr() net.Addr
- func (c *GunConn) Read(b []byte) (n int, err error)
- func (c *GunConn) RemoteAddr() net.Addr
- func (*GunConn) SetDeadline(time.Time) error
- func (*GunConn) SetReadDeadline(time.Time) error
- func (*GunConn) SetWriteDeadline(time.Time) error
- func (c *GunConn) Write(b []byte) (n int, err error)
- type GunService
- type GunServiceClient
- type GunServiceClientX
- type GunServiceServer
- type GunService_TunClient
- type GunService_TunServer
- type Hunk
- type UnimplementedGunServiceServer
- type UnsafeGunServiceServer
Constants ¶
const (
GunService_Tun_FullMethodName = "/v2ray.core.transport.internet.grpc.encoding.GunService/Tun"
)
Variables ¶
var File_transport_internet_grpc_encoding_stream_proto protoreflect.FileDescriptor
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 ¶
type GunConn struct {
// contains filtered or unexported fields
}
GunConn implements net.Conn for gun tunnel
func NewGunConn ¶
func NewGunConn(service GunService, over context.CancelFunc) *GunConn
NewGunConn creates GunConn which handles gun tunnel
func (*GunConn) RemoteAddr ¶
RemoteAddr implements net.Conn.RemoteAddr()
func (*GunConn) SetDeadline ¶
SetDeadline implements net.Conn.SetDeadline()
func (*GunConn) SetReadDeadline ¶
SetReadDeadline implements net.Conn.SetReadDeadline()
func (*GunConn) SetWriteDeadline ¶
SetWriteDeadline implements net.Conn.SetWriteDeadline()
type GunService ¶
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_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 UnimplementedGunServiceServer ¶
type UnimplementedGunServiceServer struct { }
UnimplementedGunServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedGunServiceServer) Tun ¶
func (UnimplementedGunServiceServer) Tun(GunService_TunServer) error
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.