standard.lib.shared.share_get

share_get is available since version 1.0.

Prototype:

string share_get(number share_handle)

Parameters

share_handle
the shared memory handle as returned by share_create or share_open.

Description:

Gets the data in the shared memory segment.

Return value:

Returns a string buffer containing a copy of the data in the shared memory zone.

Example
import standard.lib.shared

class Main {

	function Main() {
		var ctx=share_create(123,0xFF);
		echo ctx;
		echo share_set(ctx,"test");
		echo share_get(ctx);
		echo "\n";
		var i=0;
		while (1) {
			i++;
			echo "$i:"+share_link_count(ctx)+share_get(ctx)+"\r";
		}
	}
}