User guide
9: Client Applications — Commands and Responses
DC 900-1338I 163
9.2.2 Initiating a Session with the ICP (dlOpen)
A session identifier is used by DLI to manage information exchanged between the client
application and the ICP. The session identifier is requested by the client, then defined
and returned by the DLI. This is accomplished when the application calls
dlOpen. The
ICP software is not involved in these two steps. The
dlOpen function is declared as fol-
lows:
int dlOpen (char *cSessionName,
short (*fUsrIOCH) (char *pUseCB,
int iSessionID));
The first argument is the name of a section in the application’s DLI configuration file.
The second argument is the name of a function, supplied by the application writer, that
DLI calls when it services an I/O condition for the session identifier returned by the
dlOpen call.
The following is an example of a call to
dlOpen.
servSessID = dlOpen (“server0icp0port0”, ioComplete);
The string server0icp0port0 is the name of a section in a DLI configuration file, and
ioComplete is the name of a function the application writer provides. The value of
servSessID is used in further calls to DLI functions.