Hazaar\Warlock
Server
Summary
MethodsPropertiesConstants
No constants
Properties
$client_lookup
$client_lookup
$clients
$clients
$config
$config
$eventQueue
$eventQueue
Static
$instance
$instance
SERVER INSTANCE
$jobQueue
$jobQueue
$master
$master
$pid
$pid
Current process id
$pidfile
$pidfile
Current process id file
$procs
$procs
JOBS & SERVICES
$protocol
$protocol
$rrd
$rrd
$rrdfile
$rrdfile
$running
$running
$services
$services
$shutdown
$shutdown
$silent
$silent
$sockets
$sockets
$start
$start
Epoch of when Warlock was started
$stats
$stats
$tags
$tags
Job tags
$time
$time
Epoch of the last time stuff was processed
$tv
$tv
Default select() timeout
$waitQueue
$waitQueue
QUEUES
Methods
__construct()
__construct($silent = false)
__destruct()
__destruct()
addClient()
addClient($id, $socket, $uid = null)
bootstrap()
bootstrap()
cancelJob()
cancelJob($job_id)
checkClients()
checkClients()
checkRequestURL()
checkRequestURL($url)
commandCancel()
commandCancel($resource, $client, $job_id)
commandDelay()
commandDelay($resource, $client, $command)
commandDisable()
commandDisable($resource, $client, $name)
commandEnable()
commandEnable($resource, $client, $name)
commandKill()
commandKill($resource, $client, $payload)
commandLog()
commandLog($resource, $client, $payload)
commandSchedule()
commandSchedule($resource, $client, $command)
commandService()
commandService($resource, $client, $name)
commandSignal()
commandSignal($resource, $client, $payload)
commandSpawn()
commandSpawn($resource, $client, $payload)
commandStatus()
commandStatus($resource, $client, $payload = null)
commandStop()
commandStop($resource, $client)
commandSubscribe()
commandSubscribe($resource, $client, $event_id, $filter = null)
commandSync()
commandSync($resource, $client, $payload)
commandTrigger()
commandTrigger($resource, $client, $event_id, $data, $echo_client = true)
commandUnsubscribe()
commandUnsubscribe($resource, $client, $event_id)
disconnect()
disconnect($socket)
fieldExists()
fieldExists($search, $array)
filterEvent()
filterEvent($event, $filter = null) : bool
Tests whether a event should be filtered.

Returns TRUE if the event should be filtered (skipped), and FALSE if the event should be processed.

getClient()
getClient($socket)
getFieldValue()
getFieldValue($search, $array)
getJobId()
getJobId()
getJobStatus()
getJobStatus($job_id)
getStatus()
getStatus($full = true)
httpResponse()
httpResponse($code, $body = null, $headers = Array ( ) )
initiateHandshake()
initiateHandshake($socket, $request)
isRunning()
isRunning()
ping()
ping($resource)
processClient()
processClient($socket)
processCommand()
processCommand($resource, $client, $command, $payload, $time)
processEventQueue()
processEventQueue($client, $event_id, $filter = null) : boolean

This method is executed when a client connects to see if there are any events waiting in the event queue that the client has not yet seen. If there are, the first event found is sent to the client, marked as seen and then processing stops.

processFrame()
processFrame($frameBuffer, $client)
processJobs()
processJobs()
processSubscriptionQueue()
processSubscriptionQueue($event_id, $trigger_id = null) : boolean

This method is executed when a event is triggered. It is responsible for sending events to clients that are waiting for the event and marking them as seen by the client.

queueCleanup()
queueCleanup()
removeClient()
removeClient($socket) : bool
Removes a client from a socket.

Because a client can have multiple socket connections (in legacy mode) this removes the client reference for that socket. Once there are no more references left the client is completely removed.

run()
run()
runtimePath()
runtimePath($suffix = null, $create_dir = false) : string
Returns the application runtime directory

The runtime directory is a place where HazaarMVC will keep files that it needs to create during normal operation. For example, socket files for background scheduler communication, cached views, and backend applications.

scheduleJob()
scheduleJob($when, $function, $application, $tag = null, $overwrite = false)
send()
send($resource, $command, $payload = null, $is_legacy = false)
sendAdminEvent()
sendAdminEvent($command, $data = Array ( ) , $force_queue = false)
serviceDisable()
serviceDisable($name)
serviceEnable()
serviceEnable($name, $options = null)
setJobStatus()
setJobStatus($job_id, $status)
shutdown()
shutdown($timeout = 0)
subscribe()
subscribe($resource, $client, $event_id, $filter)
unsubscribe()
unsubscribe($client, $event_id = null, $resource = null)
write()
write($resource, $frame, $is_legacy = false)
Powered by Scroly.io Generated: Thursday, October 3rd 2019 at 2:45pm