Documentation ¶
Index ¶
- Constants
- func RunHttpServer(handlers ...*XhttpExecutor)
- func RunInterceptor(interceptor XhttpInterceptor, handlers ...*XhttpExecutor)
- func XhttpCompleteQueryOperation(xRequest *structs.ZeroRequest, xProcessor processors.ZeroQueryOperation, ...) (processors.ZeroQueryOperation, *processors.ZeroQuery, error)
- func XhttpContainsOptions(xRequest *structs.ZeroRequest, option string) bool
- func XhttpEQuery(xRequest *structs.ZeroRequest) (*database.EQuerySearch, error)
- func XhttpEQueryRequest(xRequest *structs.ZeroRequest, indexName string) (*database.EQueryRequest, *database.EQuerySearch, error)
- func XhttpKeyValueRequest(req *http.Request) map[string]string
- func XhttpMysqlQueryOperation(xRequest *structs.ZeroRequest, tableName string) (processors.ZeroQueryOperation, *processors.ZeroQuery, error)
- func XhttpPerform(executor *XhttpExecutor, writer http.ResponseWriter, request *http.Request)
- func XhttpPostgresQueryOperation(xRequest *structs.ZeroRequest, tableName string) (processors.ZeroQueryOperation, *processors.ZeroQuery, error)
- func XhttpQueryOptions(xRequest *structs.ZeroRequest) []string
- func XhttpResponseDatas(writer http.ResponseWriter, code int, message string, datas []interface{}, ...)
- func XhttpResponseMaps(writer http.ResponseWriter, code int, message string, ...)
- func XhttpResponseMessages(writer http.ResponseWriter, code int, message string)
- func XhttpURIParams(req *http.Request, xPattern string) map[string]string
- func XhttpZeroQuery(xRequest *structs.ZeroRequest) (*processors.ZeroQuery, error)
- func XhttpZeroRequest(req *http.Request) (*structs.ZeroRequest, error)
- type IPCServer
- type MqttConnackVariableHeader
- type MqttConnect
- func (mqttconn *MqttConnect) Accept(zserv ZeroServ, connect net.Conn) error
- func (mqttconn *MqttConnect) AddListener(xListener MqttMessageListener)
- func (mqttconn *MqttConnect) Close() error
- func (mqttconn *MqttConnect) OnMessage(datas []byte) error
- func (mqttconn *MqttConnect) RegisterId() string
- func (mqttconn *MqttConnect) UpdateSerialNnumber(serialNnumber uint16)
- func (mqttconn *MqttConnect) UseSerialNnumber() uint16
- type MqttConnectVariableHeader
- func (connectHeader *MqttConnectVariableHeader) CleanSession() byte
- func (connectHeader *MqttConnectVariableHeader) KeepAlive() int
- func (connectHeader *MqttConnectVariableHeader) Level() byte
- func (connectHeader *MqttConnectVariableHeader) PasswordFlag() byte
- func (connectHeader *MqttConnectVariableHeader) Protocol() string
- func (connectHeader *MqttConnectVariableHeader) ProtocolLength() int
- func (connectHeader *MqttConnectVariableHeader) Reserved() byte
- func (connectHeader *MqttConnectVariableHeader) UserNameFlag() byte
- func (connectHeader *MqttConnectVariableHeader) WillFlag() byte
- func (connectHeader *MqttConnectVariableHeader) WillQos() byte
- func (connectHeader *MqttConnectVariableHeader) WillRetain() byte
- type MqttCorePayload
- type MqttCoreVariableHeader
- type MqttFixedHeader
- func (fixedHeader *MqttFixedHeader) B0() byte
- func (fixedHeader *MqttFixedHeader) B1() byte
- func (fixedHeader *MqttFixedHeader) B2() byte
- func (fixedHeader *MqttFixedHeader) B3() byte
- func (fixedHeader *MqttFixedHeader) BTvarL(bytes []byte) int
- func (fixedHeader *MqttFixedHeader) LessLength() int
- func (fixedHeader *MqttFixedHeader) MessageType() byte
- func (fixedHeader *MqttFixedHeader) MessageTypeString() string
- type MqttIdentifierVariableHeader
- type MqttMessage
- func (message *MqttMessage) Bytes() []byte
- func (message *MqttMessage) FixedHeader() *MqttFixedHeader
- func (message *MqttMessage) MakeConnackMessage()
- func (message *MqttMessage) MakePingrespMessage()
- func (message *MqttMessage) MakePubackMessage(identifier uint16)
- func (message *MqttMessage) MakePublistMessage(topic string, identifier uint16, data []byte)
- func (message *MqttMessage) MakePubrelMessage(identifier uint16)
- func (message *MqttMessage) MakeSubackMessage(identifier uint16, results []byte)
- func (message *MqttMessage) Payload() MqttCorePayload
- func (message *MqttMessage) VariableHeader() MqttCoreVariableHeader
- type MqttMessageListener
- type MqttParamsPayload
- type MqttPayload
- type MqttPublishVariableHeader
- type MqttServer
- type MqttSubscribePayload
- type MqttTopic
- type MqttVariableHeader
- type TCPClient
- func (client *TCPClient) Active() bool
- func (client *TCPClient) AddChecker(checker ZeroDataChecker)
- func (client *TCPClient) AddListener(xListener ZeroClientListener)
- func (client *TCPClient) CheckPackageData(data []byte) []byte
- func (client *TCPClient) Close() error
- func (client *TCPClient) Connect()
- func (client *TCPClient) Heartbeat()
- func (client *TCPClient) HeartbeatCheck(heartbeatSeconds int64) bool
- func (client *TCPClient) OnMessage(datas []byte) error
- func (client *TCPClient) RemoteAddr() string
- func (client *TCPClient) This() interface{}
- func (client *TCPClient) Write(datas []byte) error
- type TCPServer
- type UDPMessageProcesser
- type UDPServer
- type XhttpExecutor
- type XhttpFromFile
- type XhttpInterceptor
- type ZeroClientConnect
- type ZeroClientListener
- type ZeroConnect
- type ZeroConnectBuilder
- type ZeroDataChecker
- type ZeroServ
- type ZeroSocketConnect
- func (zSock *ZeroSocketConnect) Accept(zserv ZeroServ, connect net.Conn) error
- func (zSock *ZeroSocketConnect) AcceptTime() int64
- func (zSock *ZeroSocketConnect) Active() bool
- func (zSock *ZeroSocketConnect) AddChecker(checker ZeroDataChecker)
- func (zSock *ZeroSocketConnect) Authorized(authMessage ...byte) bool
- func (zSock *ZeroSocketConnect) CheckPackageData(data []byte) []byte
- func (zSock *ZeroSocketConnect) Close() error
- func (zSock *ZeroSocketConnect) ConnectId() string
- func (zSock *ZeroSocketConnect) Heartbeat()
- func (zSock *ZeroSocketConnect) HeartbeatCheck(heartbeatSeconds int64) bool
- func (zSock *ZeroSocketConnect) HeartbeatTime() int64
- func (zSock *ZeroSocketConnect) OnMessage(datas []byte) error
- func (zSock *ZeroSocketConnect) RegisterId() string
- func (zSock *ZeroSocketConnect) RemoteAddr() string
- func (zSock *ZeroSocketConnect) This() interface{}
- func (zSock *ZeroSocketConnect) Write(datas []byte) error
- type ZeroSocketServer
- func (sockServer *ZeroSocketServer) OnAuthorized(conn ZeroConnect) error
- func (sockServer *ZeroSocketServer) OnConnect(conn ZeroConnect) error
- func (sockServer *ZeroSocketServer) OnDisconnect(conn ZeroConnect) error
- func (sockServer *ZeroSocketServer) RunServer()
- func (sockServer *ZeroSocketServer) UseConnect(registerId string) (ZeroConnect, error)
Constants ¶
View Source
const ( CONNECT = 0b0001 CONNACK = 0b0010 PUBLISH = 0b0011 PUBACK = 0b0100 PUBREC = 0b0101 PUBREL = 0b0110 PUBCOMP = 0b0111 SUBSCRIBE = 0b1000 SUBACK = 0b1001 UNSUBSCRIBE = 0b1010 UNSUBACK = 0b1011 PINGREQ = 0b1100 PINGRESP = 0b1110 DISCONNECT = 0b1111 LESS_LENGTH_LIMIT4 = 0x0FFFFFFF LESS_LENGTH_LIMIT3 = 0x001FFFFF LESS_LENGTH_LIMIT2 = 0x00003FFF LESS_LENGTH_LIMIT1 = 0x0000007F )
View Source
const ( MQTT_HEADER = "MQTT" MQTT_LEVEL_3_1_1 = 0x04 CONNECT_VARIABLE_HEADER_LEN = 10 )
View Source
const XHTTP_QUERY_OPTIONS_ALL = "all"
Variables ¶
This section is empty.
Functions ¶
func RunHttpServer ¶
func RunHttpServer(handlers ...*XhttpExecutor)
func RunInterceptor ¶ added in v1.15.6
func RunInterceptor(interceptor XhttpInterceptor, handlers ...*XhttpExecutor)
func XhttpCompleteQueryOperation ¶ added in v1.11.23
func XhttpCompleteQueryOperation(xRequest *structs.ZeroRequest, xProcessor processors.ZeroQueryOperation, tableName string) (processors.ZeroQueryOperation, *processors.ZeroQuery, error)
func XhttpContainsOptions ¶ added in v1.15.1
func XhttpContainsOptions(xRequest *structs.ZeroRequest, option string) bool
func XhttpEQuery ¶ added in v1.11.0
func XhttpEQuery(xRequest *structs.ZeroRequest) (*database.EQuerySearch, error)
func XhttpEQueryRequest ¶ added in v1.11.0
func XhttpEQueryRequest(xRequest *structs.ZeroRequest, indexName string) (*database.EQueryRequest, *database.EQuerySearch, error)
func XhttpKeyValueRequest ¶ added in v1.12.0
func XhttpMysqlQueryOperation ¶ added in v1.11.23
func XhttpMysqlQueryOperation(xRequest *structs.ZeroRequest, tableName string) (processors.ZeroQueryOperation, *processors.ZeroQuery, error)
func XhttpPerform ¶ added in v1.15.6
func XhttpPerform(executor *XhttpExecutor, writer http.ResponseWriter, request *http.Request)
func XhttpPostgresQueryOperation ¶ added in v1.11.23
func XhttpPostgresQueryOperation(xRequest *structs.ZeroRequest, tableName string) (processors.ZeroQueryOperation, *processors.ZeroQuery, error)
func XhttpQueryOptions ¶ added in v1.11.29
func XhttpQueryOptions(xRequest *structs.ZeroRequest) []string
func XhttpResponseDatas ¶ added in v1.0.2
func XhttpResponseDatas(writer http.ResponseWriter, code int, message string, datas []interface{}, expands map[string]interface{})
func XhttpResponseMaps ¶ added in v1.0.2
func XhttpResponseMessages ¶ added in v1.0.2
func XhttpResponseMessages(writer http.ResponseWriter, code int, message string)
func XhttpURIParams ¶ added in v1.12.5
func XhttpZeroQuery ¶ added in v1.6.3
func XhttpZeroQuery(xRequest *structs.ZeroRequest) (*processors.ZeroQuery, error)
func XhttpZeroRequest ¶ added in v1.6.0
func XhttpZeroRequest(req *http.Request) (*structs.ZeroRequest, error)
Types ¶
type IPCServer ¶ added in v1.3.0
type IPCServer struct { ZeroSocketServer // contains filtered or unexported fields }
func NewIPCServer ¶ added in v1.3.0
type MqttConnackVariableHeader ¶ added in v1.3.0
type MqttConnackVariableHeader struct {
MqttVariableHeader
}
func (*MqttConnackVariableHeader) ReturnCode ¶ added in v1.3.0
func (connackHeader *MqttConnackVariableHeader) ReturnCode() byte
func (*MqttConnackVariableHeader) SessionPresent ¶ added in v1.3.0
func (connackHeader *MqttConnackVariableHeader) SessionPresent() byte
type MqttConnect ¶ added in v1.3.0
type MqttConnect struct { ZeroSocketConnect // contains filtered or unexported fields }
func (*MqttConnect) Accept ¶ added in v1.3.0
func (mqttconn *MqttConnect) Accept(zserv ZeroServ, connect net.Conn) error
func (*MqttConnect) AddListener ¶ added in v1.12.22
func (mqttconn *MqttConnect) AddListener(xListener MqttMessageListener)
func (*MqttConnect) Close ¶ added in v1.3.0
func (mqttconn *MqttConnect) Close() error
func (*MqttConnect) OnMessage ¶ added in v1.3.0
func (mqttconn *MqttConnect) OnMessage(datas []byte) error
func (*MqttConnect) RegisterId ¶ added in v1.3.0
func (mqttconn *MqttConnect) RegisterId() string
func (*MqttConnect) UpdateSerialNnumber ¶ added in v1.12.29
func (mqttconn *MqttConnect) UpdateSerialNnumber(serialNnumber uint16)
func (*MqttConnect) UseSerialNnumber ¶ added in v1.12.24
func (mqttconn *MqttConnect) UseSerialNnumber() uint16
type MqttConnectVariableHeader ¶ added in v1.3.0
type MqttConnectVariableHeader struct {
MqttVariableHeader
}
func (*MqttConnectVariableHeader) CleanSession ¶ added in v1.3.0
func (connectHeader *MqttConnectVariableHeader) CleanSession() byte
func (*MqttConnectVariableHeader) KeepAlive ¶ added in v1.3.0
func (connectHeader *MqttConnectVariableHeader) KeepAlive() int
func (*MqttConnectVariableHeader) Level ¶ added in v1.3.0
func (connectHeader *MqttConnectVariableHeader) Level() byte
func (*MqttConnectVariableHeader) PasswordFlag ¶ added in v1.3.0
func (connectHeader *MqttConnectVariableHeader) PasswordFlag() byte
func (*MqttConnectVariableHeader) Protocol ¶ added in v1.3.0
func (connectHeader *MqttConnectVariableHeader) Protocol() string
func (*MqttConnectVariableHeader) ProtocolLength ¶ added in v1.3.0
func (connectHeader *MqttConnectVariableHeader) ProtocolLength() int
func (*MqttConnectVariableHeader) Reserved ¶ added in v1.3.0
func (connectHeader *MqttConnectVariableHeader) Reserved() byte
func (*MqttConnectVariableHeader) UserNameFlag ¶ added in v1.3.0
func (connectHeader *MqttConnectVariableHeader) UserNameFlag() byte
func (*MqttConnectVariableHeader) WillFlag ¶ added in v1.3.0
func (connectHeader *MqttConnectVariableHeader) WillFlag() byte
func (*MqttConnectVariableHeader) WillQos ¶ added in v1.3.0
func (connectHeader *MqttConnectVariableHeader) WillQos() byte
func (*MqttConnectVariableHeader) WillRetain ¶ added in v1.3.0
func (connectHeader *MqttConnectVariableHeader) WillRetain() byte
type MqttCorePayload ¶ added in v1.3.0
type MqttCorePayload interface {
Payload() []byte
}
type MqttCoreVariableHeader ¶ added in v1.3.0
type MqttCoreVariableHeader interface {
VariableHeader() []byte
}
type MqttFixedHeader ¶ added in v1.3.0
type MqttFixedHeader struct {
// contains filtered or unexported fields
}
func (*MqttFixedHeader) B0 ¶ added in v1.3.0
func (fixedHeader *MqttFixedHeader) B0() byte
func (*MqttFixedHeader) B1 ¶ added in v1.3.0
func (fixedHeader *MqttFixedHeader) B1() byte
func (*MqttFixedHeader) B2 ¶ added in v1.3.0
func (fixedHeader *MqttFixedHeader) B2() byte
func (*MqttFixedHeader) B3 ¶ added in v1.3.0
func (fixedHeader *MqttFixedHeader) B3() byte
func (*MqttFixedHeader) BTvarL ¶ added in v1.3.0
func (fixedHeader *MqttFixedHeader) BTvarL(bytes []byte) int
func (*MqttFixedHeader) LessLength ¶ added in v1.3.0
func (fixedHeader *MqttFixedHeader) LessLength() int
func (*MqttFixedHeader) MessageType ¶ added in v1.3.0
func (fixedHeader *MqttFixedHeader) MessageType() byte
func (*MqttFixedHeader) MessageTypeString ¶ added in v1.3.0
func (fixedHeader *MqttFixedHeader) MessageTypeString() string
type MqttIdentifierVariableHeader ¶ added in v1.3.0
type MqttIdentifierVariableHeader struct {
MqttVariableHeader
}
func (*MqttIdentifierVariableHeader) Identifier ¶ added in v1.3.0
func (identifierHeader *MqttIdentifierVariableHeader) Identifier() uint16
type MqttMessage ¶ added in v1.3.0
type MqttMessage struct {
// contains filtered or unexported fields
}
func (*MqttMessage) Bytes ¶ added in v1.3.0
func (message *MqttMessage) Bytes() []byte
func (*MqttMessage) FixedHeader ¶ added in v1.3.0
func (message *MqttMessage) FixedHeader() *MqttFixedHeader
func (*MqttMessage) MakeConnackMessage ¶ added in v1.3.0
func (message *MqttMessage) MakeConnackMessage()
func (*MqttMessage) MakePingrespMessage ¶ added in v1.3.0
func (message *MqttMessage) MakePingrespMessage()
func (*MqttMessage) MakePubackMessage ¶ added in v1.3.0
func (message *MqttMessage) MakePubackMessage(identifier uint16)
func (*MqttMessage) MakePublistMessage ¶ added in v1.3.0
func (message *MqttMessage) MakePublistMessage(topic string, identifier uint16, data []byte)
func (*MqttMessage) MakePubrelMessage ¶ added in v1.3.0
func (message *MqttMessage) MakePubrelMessage(identifier uint16)
func (*MqttMessage) MakeSubackMessage ¶ added in v1.3.0
func (message *MqttMessage) MakeSubackMessage(identifier uint16, results []byte)
func (*MqttMessage) Payload ¶ added in v1.3.0
func (message *MqttMessage) Payload() MqttCorePayload
func (*MqttMessage) VariableHeader ¶ added in v1.3.0
func (message *MqttMessage) VariableHeader() MqttCoreVariableHeader
type MqttMessageListener ¶ added in v1.12.20
type MqttMessageListener interface {
Publish(ZeroConnect, *MqttMessage) error
}
type MqttParamsPayload ¶ added in v1.3.0
type MqttParamsPayload struct { MqttPayload // contains filtered or unexported fields }
func (*MqttParamsPayload) Params ¶ added in v1.3.0
func (connectPayload *MqttParamsPayload) Params() []string
type MqttPayload ¶ added in v1.3.0
type MqttPayload struct {
// contains filtered or unexported fields
}
func (*MqttPayload) Payload ¶ added in v1.3.0
func (payload *MqttPayload) Payload() []byte
type MqttPublishVariableHeader ¶ added in v1.3.0
type MqttPublishVariableHeader struct {
MqttVariableHeader
}
func (*MqttPublishVariableHeader) Identifier ¶ added in v1.3.0
func (publishVariableHeader *MqttPublishVariableHeader) Identifier() uint16
func (*MqttPublishVariableHeader) Topic ¶ added in v1.3.0
func (publishVariableHeader *MqttPublishVariableHeader) Topic() string
type MqttServer ¶ added in v1.3.0
type MqttServer struct { TCPServer // contains filtered or unexported fields }
func NewMqttServer ¶ added in v1.3.0
func (*MqttServer) RunServer ¶ added in v1.3.0
func (mqttserv *MqttServer) RunServer()
type MqttSubscribePayload ¶ added in v1.3.0
type MqttSubscribePayload struct { MqttPayload // contains filtered or unexported fields }
func (*MqttSubscribePayload) Topics ¶ added in v1.3.0
func (subscribePayload *MqttSubscribePayload) Topics() []*MqttTopic
type MqttVariableHeader ¶ added in v1.3.0
type MqttVariableHeader struct {
// contains filtered or unexported fields
}
func (*MqttVariableHeader) VariableHeader ¶ added in v1.3.0
func (variableHeader *MqttVariableHeader) VariableHeader() []byte
type TCPClient ¶ added in v1.7.0
func NewTCPClient ¶ added in v1.7.0
func (*TCPClient) AddChecker ¶ added in v1.7.0
func (client *TCPClient) AddChecker(checker ZeroDataChecker)
func (*TCPClient) AddListener ¶ added in v1.7.0
func (client *TCPClient) AddListener(xListener ZeroClientListener)
func (*TCPClient) CheckPackageData ¶ added in v1.7.0
func (*TCPClient) HeartbeatCheck ¶ added in v1.7.0
func (*TCPClient) RemoteAddr ¶ added in v1.7.0
type TCPServer ¶ added in v1.3.0
type TCPServer struct { ZeroSocketServer // contains filtered or unexported fields }
func NewTCPServer ¶ added in v1.3.0
type UDPMessageProcesser ¶ added in v1.3.0
type UDPServer ¶ added in v1.3.0
type UDPServer struct {
// contains filtered or unexported fields
}
func NewUDPServer ¶ added in v1.3.0
func NewUDPServer(port int, bufferSize int, checker ZeroDataChecker, processer UDPMessageProcesser) *UDPServer
type XhttpExecutor ¶ added in v1.0.1
type XhttpExecutor struct {
// contains filtered or unexported fields
}
func XhttpFuncHandle ¶ added in v1.0.1
func XhttpFuncHandle(funcx func(http.ResponseWriter, *http.Request), path ...string) *XhttpExecutor
func XhttpHandle ¶ added in v1.0.1
func XhttpHandle(handler http.Handler, path ...string) *XhttpExecutor
type XhttpFromFile ¶ added in v1.12.0
type XhttpFromFile struct {
// contains filtered or unexported fields
}
func XhttpFromFileRequest ¶ added in v1.12.0
func XhttpFromFileRequest(req *http.Request, maxmem int64) ([]*XhttpFromFile, error)
func (*XhttpFromFile) FileHeader ¶ added in v1.12.0
func (xfile *XhttpFromFile) FileHeader() *multipart.FileHeader
func (*XhttpFromFile) FileName ¶ added in v1.12.0
func (xfile *XhttpFromFile) FileName() string
func (*XhttpFromFile) FileSize ¶ added in v1.12.0
func (xfile *XhttpFromFile) FileSize() int64
func (*XhttpFromFile) FilesBytes ¶ added in v1.12.0
func (xfile *XhttpFromFile) FilesBytes() []byte
func (*XhttpFromFile) MIMEHeader ¶ added in v1.12.0
func (xfile *XhttpFromFile) MIMEHeader() textproto.MIMEHeader
type XhttpInterceptor ¶ added in v1.15.6
type XhttpInterceptor interface {
Registry(*XhttpExecutor) http.Handler
}
type ZeroClientConnect ¶ added in v1.7.0
type ZeroClientConnect interface { structs.ZeroMetaDef Connect() RemoteAddr() string HeartbeatCheck(int64) bool Active() bool Heartbeat() Close() error Write([]byte) error OnMessage([]byte) error AddChecker(ZeroDataChecker) CheckPackageData([]byte) []byte AddListener(ZeroClientListener) }
type ZeroClientListener ¶ added in v1.7.0
type ZeroClientListener interface { OnConnect(ZeroClientConnect) error OnHeartbeat(ZeroClientConnect) error }
type ZeroConnect ¶ added in v1.3.0
type ZeroConnect interface { structs.ZeroMetaDef AcceptTime() int64 HeartbeatTime() int64 Accept(ZeroServ, net.Conn) error RegisterId() string ConnectId() string RemoteAddr() string HeartbeatCheck(int64) bool Active() bool Heartbeat() Close() error Write([]byte) error Authorized(authMessage ...byte) bool OnMessage(datas []byte) error AddChecker(ZeroDataChecker) CheckPackageData(data []byte) []byte }
type ZeroConnectBuilder ¶ added in v1.3.0
type ZeroConnectBuilder interface {
NewConnect() ZeroConnect
}
type ZeroDataChecker ¶ added in v1.3.0
type ZeroServ ¶ added in v1.3.0
type ZeroServ interface { OnConnect(ZeroConnect) error OnDisconnect(ZeroConnect) error OnAuthorized(ZeroConnect) error UseConnect(string) (ZeroConnect, error) }
type ZeroSocketConnect ¶ added in v1.3.0
func (*ZeroSocketConnect) Accept ¶ added in v1.3.0
func (zSock *ZeroSocketConnect) Accept(zserv ZeroServ, connect net.Conn) error
func (*ZeroSocketConnect) AcceptTime ¶ added in v1.10.5
func (zSock *ZeroSocketConnect) AcceptTime() int64
func (*ZeroSocketConnect) Active ¶ added in v1.3.0
func (zSock *ZeroSocketConnect) Active() bool
func (*ZeroSocketConnect) AddChecker ¶ added in v1.5.1
func (zSock *ZeroSocketConnect) AddChecker(checker ZeroDataChecker)
func (*ZeroSocketConnect) Authorized ¶ added in v1.3.0
func (zSock *ZeroSocketConnect) Authorized(authMessage ...byte) bool
func (*ZeroSocketConnect) CheckPackageData ¶ added in v1.3.0
func (zSock *ZeroSocketConnect) CheckPackageData(data []byte) []byte
func (*ZeroSocketConnect) Close ¶ added in v1.3.0
func (zSock *ZeroSocketConnect) Close() error
func (*ZeroSocketConnect) ConnectId ¶ added in v1.3.0
func (zSock *ZeroSocketConnect) ConnectId() string
func (*ZeroSocketConnect) Heartbeat ¶ added in v1.3.0
func (zSock *ZeroSocketConnect) Heartbeat()
func (*ZeroSocketConnect) HeartbeatCheck ¶ added in v1.3.0
func (zSock *ZeroSocketConnect) HeartbeatCheck(heartbeatSeconds int64) bool
func (*ZeroSocketConnect) HeartbeatTime ¶ added in v1.10.5
func (zSock *ZeroSocketConnect) HeartbeatTime() int64
func (*ZeroSocketConnect) OnMessage ¶ added in v1.3.0
func (zSock *ZeroSocketConnect) OnMessage(datas []byte) error
func (*ZeroSocketConnect) RegisterId ¶ added in v1.3.0
func (zSock *ZeroSocketConnect) RegisterId() string
func (*ZeroSocketConnect) RemoteAddr ¶ added in v1.3.0
func (zSock *ZeroSocketConnect) RemoteAddr() string
func (*ZeroSocketConnect) This ¶ added in v1.4.2
func (zSock *ZeroSocketConnect) This() interface{}
func (*ZeroSocketConnect) Write ¶ added in v1.3.0
func (zSock *ZeroSocketConnect) Write(datas []byte) error
type ZeroSocketServer ¶ added in v1.3.0
type ZeroSocketServer struct { ConnectBuilder ZeroConnectBuilder // contains filtered or unexported fields }
func (*ZeroSocketServer) OnAuthorized ¶ added in v1.3.0
func (sockServer *ZeroSocketServer) OnAuthorized(conn ZeroConnect) error
func (*ZeroSocketServer) OnConnect ¶ added in v1.3.0
func (sockServer *ZeroSocketServer) OnConnect(conn ZeroConnect) error
func (*ZeroSocketServer) OnDisconnect ¶ added in v1.3.0
func (sockServer *ZeroSocketServer) OnDisconnect(conn ZeroConnect) error
func (*ZeroSocketServer) RunServer ¶ added in v1.3.0
func (sockServer *ZeroSocketServer) RunServer()
func (*ZeroSocketServer) UseConnect ¶ added in v1.3.3
func (sockServer *ZeroSocketServer) UseConnect(registerId string) (ZeroConnect, error)
Click to show internal directories.
Click to hide internal directories.