Home > Language Reference > Classes > StreamSocket

Disconnect Method

Closes a connection.

Syntax

Public Sub Disconnect(ByVal eOption As HbSocket)

ParameterDescription
eOptionSpecifies 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:

ConstantValueDescription
hbSocketClose0Closes the socket, but does not shut down the network layer. If the connection is done via a modem, communication is not interrupted.
hbSocketShutdown1Closes 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.
hbSocketShutdownNow2Closes 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

SystemMinimal versionRemarks
Palm OSPalm OS 3.0N/A