Extracted from Pike v7.8 release 866 at 2016-11-06.
pike.ida.liu.se
[Top]
Stdio
Stdio.UDP

Method Stdio.UDP()->set_read_callback()


Method set_read_callback

UDP set_read_callback(function(mapping(string:int|string):) read_cb, mixed ... extra_args)

Description

The read_cb function will receive a mapping similar to the mapping returned by read() :

"data" : string

Received data.

"ip" : string

Data was sent from this IP.

"port" : int

Data was sent from this port.


Returns

The called object.

See also

read()