# XMLSocket.onClose()

#### Availability

Flash Player 5.

#### Usage

    myXMLSocket.onClose()

#### Parameters

None.

#### Returns

Nothing.

#### Description

Method; a callback function that is invoked only when an open connection is closed by the server. The default implementation of this method performs no actions. To override the default implementation, you must assign a function containing your own actions.

#### See also

`function`, `XMLSocket.onConnect()`