Concept Framework 2.2 documentation Contents | Index

standard.lib.shared.share_set

Name Version Deprecated
share_set version 1.0 no

Prototype:
null-returned share_set(number share_handle, string buffer_value)

Parameters:
share_handle      the shared memory handle as returned by share_create or share_open.
buffer_value      the value to write in the shared memory segment

Description:
Sets the data in the shared memory segment. The data will be copied and should NOT be bigger than the share_size of the segment.

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";
		}
	}
}

Returns:
Returns null.

Documented by Eduard Suica, generation time: Sun Jan 27 18:15:17 2013 GMT(c)2013 Devronium Applications