12

mb_bind

mb_bind
SYNOPSIS

int mb_bind( char *host, char *port_name )

DESCRIPTION

mb_bind connects the calling process to a bus on host. If host is (char *)0, the process is connected to a local bus. Specify a port_name other than (char *)0 to connect the calling process to a bus listening to a port name other than the default.

To connect a bus to a port other than magicbus, add a line in /etc/services such as:

privatebus 6667/tcp # reserved magicbus

Start another bus with:

/usr/local/etc/mbd privatebus

Hopping on several buses is possible, but in order to easily find each other, all processes are usually registered on the same bus on the same host.

mb_bind returns a descriptor, actually a mere socket, referencing the connection. This connector is used by all the other functions of the bus.

If an error occurred, mb_bind returns -3 if host isn’t 0 and gethostbyname returned an error, -2 if port_name or magicbus by default could not be found by getservbyname, or -1 if another error occurred in which case the global system variable errno is set to indicate the error.

SEE ALSO

mb_register, mb_unbind

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