Isect Middleware How-To - isdLogin

Go to the first, previous, next, last section, table of contents.

## isdLogin

    SOCKET isdLogin(char *hostname, char *service, int priority)

`SOCKET` is the file descriptor to use on subsequent calls to `isdSend()`, `isdRecv()`, and `isdLogout()`. `hostname` is an optional parameter that specifies the name or IP address of a host computer running isectd. If hostname is NULL the function will attempt to use the hostname "isectd" `ISDHOSTNAME` which should be aliased in either the hosts file or the local DNS maps.

`service` is the arbitrary name used to identify a collection of workers that understand the same requests. Service names typically relate to the actual service provided. In the example configuration the service name "echo" is used to send messages to the worker "isdecho". The only reserved service name is "op", which isectd intercepts and handles by itself. Isectd does not allow competing definitions of "op" services or workers.

`priority` is an integer used to specify the relative priority of this client's requests to another client's requests. isectd uses a simple heuristic scheduling algorithm which implements priorities by services lower-valued client connections before higher-valued clients. For instance, point-of-sale clients require faster response times than ATM machines (relatively) and ATM machines require faster response times than teller terminals. Posting programs would typically be the lowest priority. To implement this ATM clients could connect with a priority of 0, ATMs with 1, teller programs with 2, and posting programs with 3. In doing so, a posting program (typically in batch mode) would never preempt a POS, ATM, or teller transaction (as it probably shouldn't).

Since the priority is relative, any signed integer will do.

Go to the first, previous, next, last section, table of contents.