Home > Language Reference > Classes > StreamSocket
Disconnect Method
Closes a connection.
Syntax
Public Sub Disconnect(ByVal eOption As HbSocket)
| Parameter | Description |
| eOption | Specifies whether the network layer should be shut down or not. |
Remarks
The Disconnect method closes a connection previously opened with the Connect method. Using this method on a connection that has already been closed has no effect, and notably does not cause an error.
The eOption parameter specifiies whether the network layer should be shut down or not, and can take one of the following values:
| Constant | Value | Description |
| hbSocketClose | 0 | Closes the socket, but does not shut down the network layer. If the connection is done via a modem, communication is not interrupted. |
| hbSocketShutdown | 1 | Closes the socket and ask the network layer to shut down. The disconnection will occur as soon as the timeout specified in the Network preference panel elapses. |
| hbSocketShutdownNow | 2 | Closes the socket and ask the network layer to shut down immediately. You will typically use this value to force the communication to hang up. |
System requirements
| System | Minimal version | Remarks |
| Palm OS | Palm OS 3.0 | N/A |