Name: socketClosed

Type: message

Syntax: socketClosed <pSocketID>

Summary:
Sent when the remote system closes a <socket>.

Associations: stack, card, field, button, graphic, scrollbar, player,
image

Introduced: 1.0

OS: mac, windows, linux, ios, android

Platforms: desktop, server, mobile

Example:
on socketClosed theID -- close a progress window for the socket
  set the itemDelimiter to "|" -- get just the assigned name
  if there is a window (last item of theID)
  then close stack (last item of theID)
end socketClosed

Parameters:
pSocketID:
The identifier (set when you opened the socket) of the socket that's
just been closed. The socket identifier starts with the IP address of
the host the socket is connected to, and may optionally include a port
number (separated from the IP address by a colon). If there is more than
one socket connected to that host and port, you can specify which socket
by appending the connection name or number that was assigned when the
socket was opened, separated from the port number by a vertical bar (|).

Description:
Handle the <socketClosed> <message> to perform cleanup after the remote
system closes a <socket>.

The <socketClosed> <message> is sent to the <object(glossary)> that
opened the <socket>.

If the socket closed due to an error, the socketError <message> is sent
instead of <socketClosed>.

References: object (glossary), message (glossary), socket (glossary),
socketTimeout (message)

Tags: networking

