4.6 Message Exchanges During Registering and Unregistering for Server Notifications

Message exchanges when registering and unregistering for server notifications

Figure 6: Message exchanges when registering and unregistering for server notifications

A fax client can inform the server that it needs to receive the notifications of fax events. To do so, the client follows these steps:

  1. The client calls FAX_ConnectFaxServer (section 3.1.4.1.10) to establish a connection to the fax server. The parameters supplied to this function are the server name and a fax connection handle object. The server tries to establish the connection and returns false if the call fails or sets the fax connection handle object if successful.

  2. The client calls the FAX_StartServerNotification (section 3.1.4.1.100) method to register for server notifications. The client passes the connection handle , the name of the fax client machine, a pointer to a string containing the client machine RPC server endpoint, and a pointer to a string that contains the fax client RPC server's protocol sequence string, among other parameters.

  3. The fax server starts an RPC client and calls Fax_OpenConnection (section 3.2.4.5) by using the supplied endpoint, protocol sequence information, and context handle information.

  4. The fax server sends a notification of events to the client by using the Fax_ClientEventQueue (section 3.2.4.2) method.

  5. When the client no longer needs to receive notifications, it calls FAX_EndServerNotification (section 3.1.4.1.17).

  6. The server calls Fax_CloseConnection (section 3.2.4.4) to close the connection with the client.

  7. To end the connection to the fax server, the client calls FAX_ConnectionRefCount (section 3.1.4.1.11) by using the faxHandle parameter that was obtained in step 1 and a value of 0 for the dwConnect argument.