3

mb_register

mb_register
SYNOPSIS

int mb_register( int socket, int msg_id, char *app_name, int sync )

DESCRIPTION

mb_register enables the calling process to receive messages sent to app_name. socket is a connector returned by a previous call to mb_bind. msg_id is a request number which can be used to uniquely identify the reply.

app_name specifies the public name under which the calling process wishes to be known. If it is (char *)0, the calling process will not be registered to receive messages from other processes.

If sync is 1, the calling process is blocked until the bus responds and mb_register returns the number of processes registered as app_name or -1 if an error occurred. Use sync only if you are sure no other messages are waiting to be read.

If sync is 0, mb_register immediately returns 0 or -1 in an error occurred. The reply must be read with mb_receive.

If another process is already registered as app_name, it will continue to receive messages sent to app_name. When it exits, the bus will start forwarding messages sent to app_name to one of the other processes bound as app_name.

SEE ALSO

mb_bind, mb_probe, mb_receive

Comments

Your comment:
[p] [b] [i] [u] [s] [quote] [pre] [br] [code] [url] [email] strip help 2000

Enter a maximum of 2000 characters.
Improve the presentation of your text with the following formatting tags:
[p]paragraph[/p], [b]bold[/b], [i]italics[/i], [u]underline[/u], [s]strike[/s], [quote]citation[/quote], [pre]as is[/pre], [br]line break,
[url]http://www.izend.org[/url], [url=http://www.izend.org]site[/url], [email]izend@izend.org[/email], [email=izend@izend.org]izend[/email],
[code]command[/code], [code=language]source code in c, java, php, html, javascript, xml, css, sql, bash, dos, make, etc.[/code].