Disconnects the client from the AppServer or Web service currently associated with the specified server handle. For the socket, closes the socket by terminating the connection between the socket and the port to which it is connected.
Return type: LOGICAL
Applies to: Server object handle, Server socket object handle
When the AppServer receives a disconnect request:
If an error occurs during the disconnection from an AppServer, DISCONNECT( ) returns FALSE. An error occurs if:
If DISCONNECT( ) completes successfully, the CONNECTED( ) method returns FALSE. In addition, all attributes of the SERVER object (except for the FIRST PROCEDURE and LAST PROCEDURE attributes) are restored to their initial state. Specifically, SUBTYPE returns the Unknown value (?).
For more information on AppServers, see OpenEdge Application Server: Developing AppServer Applications.
For sockets, the AVM automatically closes a socket if it detects that the connection to which the socket is bound has failed or been terminated.