Livecode Wiki

A Message sent when an open socket, read from socket or write to socket command halts for the time specified by the socketTimeoutInterval property. If there is a message handler by the same name in the message path, then it will be executed.



socketTimeout <socketID>

The parameter <socketID> is the identifier (set when you opened the socket) of the socket which had an error. The identifier (set when you opened the socket) of thesocket which had an error.

The socketTimeout message is sent to the object whose script created the socket.

Message handler[]


on socketTimeout theID
  answer error "The connnection is not responding." \
     with "Keep Trying" or "Cancel"
  if it is "Cancel" then close socket theID
end socketTimeout

Use the socketTimeout Message handler to take action when a socket communication has not completed within the time set by the socketTimeoutInterval.

See also: close socket, open socket, openSockets, socketClosed, socketError & socketTimeoutInterval.