close (XMLSocket.close method)

public close() : Void

Closes the connection specified by XMLSocket object.

Availability: ActionScript 1.0; Flash Player 5

Example

The following simple example creates an XMLSocket object, attempts to connect to the server, and then closes the connection.

var socket:XMLSocket = new XMLSocket();
socket.connect(null, 2000);
socket.close();

See also

connect (XMLSocket.connect method)