19

mb_send

mb_send
SYNOPSIS

int mb_send( int socket, char *app_name, int msg_type, int msg_id, int msg_len, u_char *msg )

DESCRIPTION

mb_send sends msg_len bytes of msg to another process registered as 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. msg_type can be MB_ONEWAY, MB_TWOWAY or MB_MULTIWAY. Include mb.h to define these constants.

MB_ONEWAY'1'Sends msg to a process registered as app_name. Asks for no reply.
MB_TWOWAY'2'Sends msg to a process registered as app_name. Asks for a reply.
MB_MULTIWAY'M'Broadcasts msg to all processes registered as app_name. Asks for no reply.

mb_send returns 0 if msg could be written to socket or -1 if an error occurred.

If msg_type is MB_ONEWAY or MB_MULTIWAY, no reply is expected from the process or the processes registered as app_name. If msg_type is MB_TWOWAY, the process registered as app_name is expected to return a reply message.

If no process is registered in the domain app_name, the bus sends a MB_NOBODY message to the sender. If a reply is expected and the receiver doesn't reply after a certain delay, 60 seconds in the standard configuration, the bus sends a MB_TIMEOUT to the sender.

SEE ALSO

mb_receive, mb_reply

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].