MWPROVIDE
Section: MidWay Programmer's Manual (3C)
Updated: DATE
Index
Return to Main Contents
NAME
mwprovide mwunprovide - The act of making services available in the MidWay instance
SYNOPSIS
#include <MidWay.h>
int mwprovide(char * service, int (*svcfunc) (mwsvcinfo*), int flags);
int mwunprovide(char * service);
DESCRIPTION
These calls control which services a server provides to the MidWay instance. The
service
argument gives the name the service shall be known under in the
instance. The max length of the service name is 32 (see
MidWay.h). Legal characters in the name is all upper and lower
characters (a-z) all digits, underscore, minus, plus, and period.
Service names with leading periods will not be exported to other
instances thru gateways unless explicitly named and renamed to a name
without a leading period.
The
svcfunc
is a pointer to the C function that is the service routine. See
mwservice(3C)
on how to write these functions. The supported flags are:
- MWCONV
-
This is a conversational service.
- MWSTDIO
-
Only legal on conversational services. The file descriptor for the socket is also
available on filedescriptor 0 (stdin) and 1 (stdout).
- MWUNIQUE
-
If
mwprovide()
succeeds, this server will be the one and only service providing this service.
NYI! (with in the instance?? or globally???)
RETURN VALUES
o on success, and -errno on failure.
ERRORS
WARNINGS
You can also use
mwprovide()
in a service routine to do this in run-time, which is a good thing,
but You can do
mwunprovide()
on services provided by
mwserver()
or thru
mwd().
It would then be impossible to re provide it without a server restart.
I might add a dynamic/static flag to a service in a future version of MidWay.
EXAMPLES
BUGS
SEE ALSO
STANDARDS
NONE
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- RETURN VALUES
-
- ERRORS
-
- WARNINGS
-
- EXAMPLES
-
- BUGS
-
- SEE ALSO
-
- STANDARDS
-
This document was created by
man2html,
using the manual pages.
Time: 11:18:50 GMT, October 24, 2000