Disconnect from the HAM
#include <ha/ham.h> int ham_disconnect( unsigned flags); int ham_disconnect_nd( int nd, unsigned flags); int ham_disconnect_node( const char *nodename, unsigned flags);
The ham_disconnect() function closes a previously open connection to a HAM. The ham_disconnect_nd() and ham_disconnect_node() functions close previously opened connections to remote HAMs.
The nd specified to ham_disconnect_nd is the node identifier of the remote node at the time the ham_disconnect_nd() call is made.
|Since node identifiers are transient objects, you should obtain the value for nd immediately before the call, using netmgr_strtond() or another function that converts nodenames into node identifiers.|
The ham_disconnect_node() function takes as a parameter a fully qualified node name (FQNN).
Because the library maintains a reference count, the actual connection to the HAM is released only when the number of calls made to ham_disconnect() matches the number of calls previously made to ham_connect().
When a process calls ham_connect() and then calls fork(), the connection is no longer valid in the child process. To reconnect to the HAM, the child process must call either:
There are no flags defined at this time.
ham_attach_self(), ham_connect(), ham_connect_nd(), ham_connect_node(), ham_stop()
fork() in the QNX Neutrino Library Reference