Sockets Toolkit - disconnect
- Loadable Function: disconnect
(s) Disconnect socket.
Disconnects the socket s. If successful,
disconnectreturns 0, otherwise, it returns -1.Since we can’t call fclose on the file descriptor directly, use this function to disconnect the socket.