Closing the Service Provider

The next routine in the service interface library example is inter_close, which closes the Stream to the service provider.

inter_close(fd)
{
close(fd);
}

The routine closes the given file descriptor. This causes the protocol driver to free any resources associated with that Stream. For example, the driver can unbind the protocol address that had previously been bound to that Stream, thereby freeing that address for use by another service user.