Spread 4.0.0 C API

SP_disconnect
 
int SP_disconnect (mailbox mbox);


Parameters
  mbox Spread connection handle to disconnect


Return Values
  0 Success
  ILLEGAL_SESSION Session mbox given is not a valid connection


Description
 

SP_disconnect should be called when the application is finished with a connection to the Spread daemon. The application may have other connections still open to the daemon and may open a new connection after disconnecting.

If any SP_ function returns a CONNECTION_CLOSED or NET_ERRROR_ON_SESSION error on any call, then the mailbox cannot be used anymore until it is disconnected with a call to this function and then reconnected by calling SP_connect(). Any other SP_ calls will only immediately return the same error value.

The mbox should be for the connection you wish to disconnect from.



Requirements
  Header: Include sp.h
Library: Use libspread
Version: 4.0


Also See
  spread programmer's reference, SP_connect