Methods
-
Command(opts)
-
Process the handshake request.
Parameters:
Name Type Description optsObject option parameters opts.handshake(msg, cb(err, resp)) handshake callback. msg is the handshake message from client. opts.hearbeat heartbeat interval (level?) opts.version required client level -
Command(opts)
-
Process heartbeat request.
Parameters:
Name Type Description optsObject option request opts.heartbeat heartbeat interval -
configure()
-
Configure pomelo logger
-
create(app) → {Server}
-
Server factory function.
Parameters:
Name Type Description appApplication current application context Returns:
Server - server instance
Type Definitions
-
AutoFilters
-
The Auto loaded filters
Properties:
Name Type Description serialfunction timefunction timeoutfunction toobusyfunction -
AutoRpcFilters
-
The Auto loaded filters
Properties:
Name Type Description rpcLogfunction toobusyfunction -
Connection
-
-
DefaultComponents
-
The Default Components
Properties:
Name Type Description __connector__Connector __backendSession__BackendSessionService __channel__ChannelService __server__ServerComp __monitor__MonitorComp __i18n__SexPomeloI18n -
DefaultConnectors
-
The connectors
Properties:
Name Type Description sioconnectorstring hybridconnectorstring udpconnectorstring mqttconnectorstring -
PluginCfg
-
PluginCfg
Properties:
Name Type Description packagestring plugin require path nameString plugin name serverTypeString plugin use serverType cfgObject plugin config -
RouteArg
-
路由Arg
Properties:
Name Type Description idnumber id typenumber 类型 compressRoutenumber 是否压缩路由 routenumber 路由 compressGzipnumber 是否压缩 bodyobject 数据体 Properties
Name Type Description dataArray.<number> 数据 serNamestring 服务器名 -
RouteMsg
-
路由信息
Properties:
Name Type Description namespacestring 命名空间 serverTypestring 服务类型 servicestring 服务 methodstring 方法 argsArray.<RouteArg> 参数 -
ServerInfo
-
The ServerInfo
Properties:
Name Type Description mainstring The main javascript full path. envstring The run env. idstring The Server ID. hoststring The Server run host. portnumber The Server run port. clientPortnumber The Server run client port. frontendstring The Server is frontend server 'true'|'false' . serverTypestring The Server type. -
SexAppCfg
-
Cfg
Properties:
Name Type Description namestring app name pluginsArray.<PluginCfg> 插件