Quark
#
Modules #
quark/actionquark/appquark/bubblesquark/bufferquark/checkboxquark/cssquark/ctrquark/dialogquark/eventquark/fontquark/fsquark/hashquark/httpquark/indexquark/jsonbquark/keyboardquark/mediaquark/navquark/netquark/osquark/pathquark/pkgquark/screenquark/stepperquark/storagequark/testquark/typesquark/utilquark/viewquark/windowquark/wsquark/_bufferquark/_commonquark/_eventquark/_extquark/_md5quark/_sha1quark/_sha256quark/_utilquark/_watching
Quark v1.3.0 Documentation
Table of Contents
quark/ws #
Enum: PacketType #
PacketType #
Defines the types of packets used in WSClient communication.
Interface: Packet #
Packet #
Represents a packet structure used in WSClient communication.
Class: WSConversation #
WSConversation #
WSConversation is extended from WebSocket to provide a WSClient connection.
@extendsWebSocket
wsconversation.token #
Session token
@gettoken:
wsconversation.autoReconnect #
autoReconnect:
wsconversation.connect() #
@override
Connect to the WebSocket server.@returnvoid
wsconversation.close() #
@override
Close the conversation connection.
wsconversation.sendPacket(p) #
Send a packet to the server.
METHOD_CALL_TIMEOUT #
120s
@constMETHOD_CALL_TIMEOUT:
Class: WSCEvent #
WSCEvent #
wscevent.remoteSender #
@getremoteSender:string
wscevent.constructor(data?,sender?) #
@paramdata?:anyEvent data@paramsender?:stringRemote sender id
Class: WSClient #
WSClient #
WSClient is Qktool's WebSocket service client.
Through it, you can call the service methods of server provided or listen to the service events.
@extendsNotification<WSCEvent>
wsclient.name #
Service name on the server
@getname:string
wsclient.conv #
Conversation instance
@getconv:WSConversation
wsclient.onLoad #
Triggered when the client is loaded and ready to use.
@eventonLoad:EventNoticer<WSCEvent>
wsclient.constructor(serviceName,conv) #
@paramserviceName:stringService name on the server@paramconv:WSConversationConversation instance
wsclient.receiveMessage(packet) #
To handle received messages from the server.
wsclient.callMethod(method,data,sender) #
The remote service calls a method on the client by the method name.
@parammethod:string@paramdata:any@paramsender:string@parammethod: Method name to call@paramdata?: Data to send@paramtimeout?: Timeout in milliseconds, default 120s@paramsender?: Sender name, default this service name
wsclient.send(method,data?,sender?) #
To call a method on the server but there will be no callback.