GoLang ZMQDevice::setTimerCallback

request it (188)
GoLang replacement for PHP's ZMQDevice::setTimerCallback [edit | history]



Do you know a GoLang replacement for PHP's ZMQDevice::setTimerCallback? Write it!

PHP ZMQDevice::setTimerCallback

PHP original manual for ZMQDevice::setTimerCallback [ show | php.net ]

ZMQDevice::setTimerCallback

(No version information available, might only be in Git)

ZMQDevice::setTimerCallbackSet the timer callback function

Description

public ZMQDevice ZMQDevice::setTimerCallback ( callable $cb_func , int $timeout [, mixed $user_data ] )

Sets the timer callback function. The timer callback will be invoked after timeout has passed. The difference between idle and timer callbacks are that idle callback is invoked only when the device is idle. The callback function signature is callback (mixed $user_data). Added in ZMQ extension version 1.1.0.

Parameters

cb_func

Callback function to invoke when the device is idle. Returning false or a value that evaluates to false from this function will cause the device to stop.

timeout

How often to invoke the idle callback in milliseconds. The idle callback is invoked periodically when there is no activity on the device. The timeout value guarantees that there is at least this amount of milliseconds between invocations of the callback function.

user_data

Additional data to pass to the callback function.

Return Values

On success this method returns the current object.