MWATTACH
Section: MidWay Programmer's Manual (3C)
Updated: DATE
Index
Return to Main Contents
NAME
mwattach, mwdetach - Attaching to a running MidWay instance
SYNOPSIS
#include <MidWay.h>
int mwattach(int url, char * name,
char * username, char * password, int flags);
int mwdetach();
DESCRIPTION
The call
mwattach()
is analogous to connect() and shmat(), it is used to logon
to a running MidWay system. To logoff you then use
mwdetach().
There are two different methods for a program to attach itself to a MidWay instance.
Either via IPC (sysvipc is currently only supported. Posix IPC is too new.), via
http, or a native midway protocol. (none of the two latter are yet implemented).
OPTIONS
- url
-
A string that indicate the address of the running instance/domain. See
MidWay(7)
for a complete description of attchment adresses.
URL format: for IPC
attachment
ipc://key
or
ipc://[instancename]
instancename assumed to be "default" if absent,
or
srbp:[//ipaddress[:port]]/domain
or
http://ipaddress[:port]
for TCP/IP. If NULL wee look for the environment variable MWADDRESS instead.
If not set,
ipc://default
is tried, and finally
ipc://userid
- username
-
Only needed if protocol is other then ipc. For ipc we are always using OS authentication.
- password
-
mwd.conf(4)
for authentication methods.
- flags
-
If
MWCLIENT
you are connecting as an IPC client (really 0). If
MWSERVER
you want to attach as both client and server.
MWSERVERONLY
says you want to attach as just a server (mwcall() will then fail).
- name
-
a member name, may be NULL, at which arg[0] is substituted.
RETURN VALUES
-errno
ERRORS
Rather complex, shmget(), shmat(), EISCONN if called twice, _mw_ipc_putmessage(), _mw_get_message()
WARNINGS
EXAMPLES
BUGS
SEE ALSO
MidWay(7)
STANDARDS
NONE
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- RETURN VALUES
-
- ERRORS
-
- WARNINGS
-
- EXAMPLES
-
- BUGS
-
- SEE ALSO
-
- STANDARDS
-
This document was created by
man2html,
using the manual pages.
Time: 11:18:49 GMT, October 24, 2000