IP_NserveInit

Cogent API and Utilities: Version 4.1
Prev |  | Next

# `IP_NserveInit`

`IP_NserveInit` -- creates a task structure and informs nserve.

## Syntax

``IP_Task* IP_NserveInit`(char* name, char* domain, char* qname, int qsize, int flags);`

## Arguments

`name`

  A public name for this task. This must be unique system-wide.

`domain`

  A Cascade DataHub domain name, or `NULL`.

`qname`

  A queue name, or `NULL`.

`qsize`

  The number of messages in the queue, or `0`.

`flags`

  A bitwise-`OR` of initialization flags, or `0`.

## Returns

A task structure pointer on success, or `NULL` on failure, and `errno` is set.

## Description

This function creates a task structure for the current task, and sends the necessary information to nserve. If the `domain` is `NULL`, the default domain is used. If the `qname` is null, then the task will have no input queue. If the `qsize` is `0`, then it will be assigned a default value (currently `100`). There are currently no flags.

Task names must be unique system-wide. This restriction is enforced as much as possible by nserve, but there are certain unavoidable situations that may allow multiple processes on different nodes to register the same name. Some care should be taken by the programmer to ensure that this does not happen.

## See Also

The Cascade NameServer, Cascade NameServer Functions, nserve, `IP_NserveInitMyself`

Prev | Home | Next
`IP_NserveClose` | Up | `IP_NserveInitMyself`

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.