Name

XMLSocket.close( ) Method — terminate an open connection to a server application

Availability

Flash 5

Synopsis

socket.close( )

Description

The close( ) method severs the communication link between socket and a server application. Once close( ) has been executed on socket, subsequent attempts to invoke send( ) on socket fail. Likewise, the server application will no longer be able to send data to Flash through socket.

Note that close( ) has no effect if the socket is already closed or was never connected. Furthermore, close( ) does not trigger the onClose( ) handler of the socket object—onClose( ) is triggered only by a server-side connection closure.

See Also

XMLSocket.connect( ), XMLSocket.onClose( )

Get ActionScript: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.