The mi_get_session_connection() function
The mi_get_session_connection() function obtains a session-duration connection descriptor.
Syntax
MI_CONNECTION *mi_get_session_connection()
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
No | Yes |
Usage
The mi_get_session_connection() function obtains a session-duration connection, which provides access to the connection for the session (which the client application begins). A UDR connection that mi_open() establishes is private to the UDR; that is, it is valid until the UDR completes. A session-duration connection is valid until the end of the session.
- Do not use mi_close() to free a session-duration
connection descriptor.
A session-duration connection descriptor has the duration of the session. An attempt to free a session-duration connection with mi_close() generates an error.
- Do not cache a session-duration connection descriptor in the user
state of an MI_FPARAM structure.
You must obtain a session-duration connection descriptor in each UDR that uses it.
- Do not call mi_get_session_connection() in
a parallelizable UDR.
If the UDR must be parallelizable, use mi_open() to obtain a connection descriptor.
Return values
- An MI_CONNECTION pointer
- A pointer to the session-duration connection descriptor for the session.
- NULL
- The function was not successful.