initconnect

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Default_Response_RetType = int32(-400)
)

Default values for Response fields.

Variables

View Source
var File_InitConnect_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type C2S

type C2S struct {
	ClientVer  *int32  `protobuf:"varint,1,req,name=clientVer" json:"clientVer,omitempty"`   //客户端版本号,clientVer = "."以前的数 * 100 + "."以后的,举例:1.1版本的clientVer为1 * 100 + 1 = 101,2.21版本为2 * 100 + 21 = 221
	ClientID   *string `protobuf:"bytes,2,req,name=clientID" json:"clientID,omitempty"`      //客户端唯一标识,无生具体生成规则,客户端自己保证唯一性即可
	RecvNotify *bool   `protobuf:"varint,3,opt,name=recvNotify" json:"recvNotify,omitempty"` //此连接是否接收市场状态、交易需要重新解锁等等事件通知,true代表接收,FutuOpenD就会向此连接推送这些通知,反之false代表不接收不推送
	//如果通信要加密,首先得在FutuOpenD和客户端都配置RSA密钥,不配置始终不加密
	//如果配置了RSA密钥且指定的加密算法不为PacketEncAlgo_None则加密(即便这里不设置,配置了RSA密钥,也会采用默认加密方式),默认采用FTAES_ECB算法
	PacketEncAlgo       *int32  `protobuf:"varint,4,opt,name=packetEncAlgo" json:"packetEncAlgo,omitempty"`            //指定包加密算法,参见Common.PacketEncAlgo的枚举定义
	PushProtoFmt        *int32  `protobuf:"varint,5,opt,name=pushProtoFmt" json:"pushProtoFmt,omitempty"`              //指定这条连接上的推送协议格式,若不指定则使用push_proto_type配置项
	ProgrammingLanguage *string `protobuf:"bytes,6,opt,name=programmingLanguage" json:"programmingLanguage,omitempty"` //接口编程语言,用于统计语言偏好
	// contains filtered or unexported fields
}

func (*C2S) Descriptor deprecated

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

Deprecated: Use C2S.ProtoReflect.Descriptor instead.

func (*C2S) GetClientID

func (x *C2S) GetClientID() string

func (*C2S) GetClientVer

func (x *C2S) GetClientVer() int32

func (*C2S) GetPacketEncAlgo

func (x *C2S) GetPacketEncAlgo() int32

func (*C2S) GetProgrammingLanguage

func (x *C2S) GetProgrammingLanguage() string

func (*C2S) GetPushProtoFmt

func (x *C2S) GetPushProtoFmt() int32

func (*C2S) GetRecvNotify

func (x *C2S) GetRecvNotify() bool

func (*C2S) ProtoMessage

func (*C2S) ProtoMessage()

func (*C2S) ProtoReflect

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

func (*C2S) Reset

func (x *C2S) Reset()

func (*C2S) String

func (x *C2S) String() string

type Request

type Request struct {
	C2S *C2S `protobuf:"bytes,1,req,name=c2s" json:"c2s,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetC2S

func (x *Request) GetC2S() *C2S

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {
	RetType *int32  `protobuf:"varint,1,req,name=retType,def=-400" json:"retType,omitempty"` //返回结果,参见Common.RetType的枚举定义
	RetMsg  *string `protobuf:"bytes,2,opt,name=retMsg" json:"retMsg,omitempty"`             //返回结果描述
	ErrCode *int32  `protobuf:"varint,3,opt,name=errCode" json:"errCode,omitempty"`          //错误码,客户端一般通过retType和retMsg来判断结果和详情,errCode只做日志记录,仅在个别协议失败时对账用
	S2C     *S2C    `protobuf:"bytes,4,opt,name=s2c" json:"s2c,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetErrCode

func (x *Response) GetErrCode() int32

func (*Response) GetRetMsg

func (x *Response) GetRetMsg() string

func (*Response) GetRetType

func (x *Response) GetRetType() int32

func (*Response) GetS2C

func (x *Response) GetS2C() *S2C

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type ResponseChan

type ResponseChan chan *Response

func (ResponseChan) Close

func (ch ResponseChan) Close()

func (ResponseChan) Send

func (ch ResponseChan) Send(b []byte) error

type S2C

type S2C struct {
	ServerVer         *int32  `protobuf:"varint,1,req,name=serverVer" json:"serverVer,omitempty"`                 //FutuOpenD的版本号
	LoginUserID       *uint64 `protobuf:"varint,2,req,name=loginUserID" json:"loginUserID,omitempty"`             //FutuOpenD登陆的牛牛用户ID
	ConnID            *uint64 `protobuf:"varint,3,req,name=connID" json:"connID,omitempty"`                       //此连接的连接ID,连接的唯一标识
	ConnAESKey        *string `protobuf:"bytes,4,req,name=connAESKey" json:"connAESKey,omitempty"`                //此连接后续AES加密通信的Key,固定为16字节长字符串
	KeepAliveInterval *int32  `protobuf:"varint,5,req,name=keepAliveInterval" json:"keepAliveInterval,omitempty"` //心跳保活间隔
	AesCBCiv          *string `protobuf:"bytes,6,opt,name=aesCBCiv" json:"aesCBCiv,omitempty"`                    //AES加密通信CBC加密模式的iv,固定为16字节长字符串
	UserAttribution   *int32  `protobuf:"varint,7,opt,name=userAttribution" json:"userAttribution,omitempty"`     //用户类型,牛牛用户或MooMoo用户
	// contains filtered or unexported fields
}

func (*S2C) Descriptor deprecated

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

Deprecated: Use S2C.ProtoReflect.Descriptor instead.

func (*S2C) GetAesCBCiv

func (x *S2C) GetAesCBCiv() string

func (*S2C) GetConnAESKey

func (x *S2C) GetConnAESKey() string

func (*S2C) GetConnID

func (x *S2C) GetConnID() uint64

func (*S2C) GetKeepAliveInterval

func (x *S2C) GetKeepAliveInterval() int32

func (*S2C) GetLoginUserID

func (x *S2C) GetLoginUserID() uint64

func (*S2C) GetServerVer

func (x *S2C) GetServerVer() int32

func (*S2C) GetUserAttribution

func (x *S2C) GetUserAttribution() int32

func (*S2C) ProtoMessage

func (*S2C) ProtoMessage()

func (*S2C) ProtoReflect

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

func (*S2C) Reset

func (x *S2C) Reset()

func (*S2C) String

func (x *S2C) String() string

Jump to

Keyboard shortcuts

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